Giter Site home page Giter Site logo

nuarig / competitions Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.98 MB

Competitions is a platform to support robust peer review within and across CTSA hubs. This is a cloud-based, single-sign on application for investigators, reviewers and administrators. With Competitions, you can post opportunities, submit applications and review and score those submissions

License: MIT License

Ruby 73.77% JavaScript 7.83% CSS 0.08% HTML 2.54% SCSS 4.07% Haml 11.70% Shell 0.01%
data2health

competitions's People

Contributors

dependabot[bot] avatar fanglinnw avatar firaswehbe avatar gh-cchmc avatar jseraf avatar lmkw avatar mattbaumann1 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

gh-cchmc

competitions's Issues

add select2 gem

To prevent dropdown menus from becoming too annoying, we should add the select2 gem.

move methods into decorators

Move methods from controllers and models into decorators that are better suited there.

Known methods are:
app/models/user.rb
name
app/controllers/grants/grant_users_controller.rb
unassigned_users_by_grant

Also look for any other methods that would better fit in a decorator.

Pundit- Submission::Form policy for Admin Role

  • Building Submission Forms
    • Pundit Policy Config
      • Admin
        • Unpublished
          • Can create
          • Can Edit
          • Can view (once assigned to grant)
        • Published
          • No existing submissions
            • Can not Edit (until unpublished)
            • Can unpublish (available?)
            • Can view (once assigned to grant)
            • Cannot delete
          • With Existing Submissions
            • Can not Edit
            • Cannot unpublish
            • Can view (once assigned to grant)
            • Cannot delete

Responses

Submission is link between user and grant they're submitting to
Questions are associated with the grant
Submission is a collection of responses
Place to store all responses

Single table inheritance models
Response model (integer, float, string)
Associated controllers
Views
Validation

Pundit- Submission::Form policy for Viewer Role

  • Building Submission Forms
    • Pundit Policy Config
      • Viewer
        • Unpublished
          • Can view (once assigned to grant)
        • Published
          • No existing submissions
            • Can view (once assigned to grant)
            • Cannot delete
          • With Existing Submissions
            • Can view (once assigned to grant)
            • Cannot delete

rules for grant state changes (draft, publish, etc)

E.g.,
Shouldn't see delete button if can't delete
Shouldn't see draft button if you can't make it a draft

Process:

  1. Begin creating grant
  2. Choose Save as Draft or Save and Publish
  3. If draft, stays draft. If it's published also check Publish Date

Can you edit a published grant?
Yes
Can you edit a published grant with submissions?
Yes

5 STATES:

  1. Demo--yes, make it like Study Tracker's STUXXXXXXX with limited access
  2. Draft--yes
  3. Published--yes
    Open and Closed are descriptors of the grant, not states
  4. Completed--Grant has been awarded, grant creator fills in the amount was awarded and to whom
  5. Archived--Old grants that people don't need to see all the time, automatically happens 180 days after panel review date or input award amount

Front end - edits

  • Convert to HAML (timebox to 30 min) @nutodd will be using a stopwatch
  • Convert from Bootstrap to Foundation

3. Responses: Validation

Start using keyword parameters

Change Response model to only have one text_value

write tests off of the question.

Question
def check_whether_required?
Should this only be if response_value: empty?
Figure out where this goes
don't need its own method. response.question.required

def validate_response(response_value:)
set error messages(open structs)
This is where the def upper and lower bound validations get called.
It takes the name of the constraint and then knows which of the methods to call in the Constraint model, where there will be 2 methods one for the upper and one for the lower value, using send.

TypeQuestions
def is_correct_type?(response_value:)
define error messages

def translate(response_value:)
check if value exists
check type matches
cast the response_value

TypeConstraints
def upper and lower bounds validations(constraint_question_value:, response_value:)
ex. IntegerConstraint - def validate_maximum_value(cq_value:, translated_response_value)

Response
def validate_against_constraint
error handling
calls self.quetion.validate_response(value: self.value)

Random questions
If not required accept empty or set a default of not answered (set constant?)
Maybe this can be handled within response. (question.required?)

Question combines all error messages from constraints(service?)

Confirm unique combination of question and constraint in constraint_questions.

Pundit- Submission::Form policy for Editor Role

  • Building Submission Forms
    • Pundit Policy Config
      • Editor
        • Unpublished
          • Can create
          • Can Edit
          • Can view (once assigned to grant)
        • Published
          • No existing submissions
            • Can not Edit (until unpublished)
            • Can unpublish (available?)
            • Can view (once assigned to grant)
            • Cannot delete
          • With Existing Submissions
            • Can not Edit
            • Cannot unpublish
            • Can view (once assigned to grant)
            • Cannot delete

FSM host

Firas, can you please comment?

Hello Laura and all,

Here is the estimate of the AWS hosting cost (about $125/month or $1500/year (two VMs + secure transit connection back to campus). Usually this will be charged directly to a chartstring.

Let me know if that changes the hosting preference or decision or not.

Thanks.
Dong

Update routes

Does FormBuilder need its own namespace within the application? Should it be nested under the grant?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.