Class: ExamRegistration::AuthorizationCriterion::PassedExercises
- Inherits:
-
ExamRegistration::AuthorizationCriterion
- Object
- ExamRegistration::AuthorizationCriterion
- ExamRegistration::AuthorizationCriterion::PassedExercises
- Defined in:
- app/models/exam_registration/authorization_criterion.rb
Instance Attribute Summary
Attributes inherited from ExamRegistration::AuthorizationCriterion
Instance Method Summary collapse
Methods inherited from ExamRegistration::AuthorizationCriterion
#as_json, #authorization_status_for, #ensure_valid!, #initialize, parse, parse_criterion_type, #process_request!, #type
Constructor Details
This class inherits a constructor from ExamRegistration::AuthorizationCriterion
Instance Method Details
#meets_authorization_criteria?(authorization_request) ⇒ Boolean
58 59 60 |
# File 'app/models/exam_registration/authorization_criterion.rb', line 58 def () .user.passed_submissions_count_in(.organization) >= value end |
#valid? ⇒ Boolean
54 55 56 |
# File 'app/models/exam_registration/authorization_criterion.rb', line 54 def valid? value.positive? end |