Ignore:
Timestamp:
29 Oct 2023, 21:05:12 (13 months ago)
Author:
Henrik Bettermann
Message:

Implement cutoff mark for application.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py

    r17085 r17627  
    555555    @invariant
    556556    def course_choice(applicant):
     557
     558        if applicant.course1:
     559            if  applicant.jamb_score is None:
     560                raise Invalid(_("Total JAMB score not set."))
     561            if applicant.course1.custom_float_1 and applicant.course1.custom_float_1 > applicant.jamb_score:
     562                raise Invalid(_("You do not meet the minimum cutoff mark for course %s. Cutoff score for this course is %s. Please consider selecting an alternative choice." % (
     563                    applicant.course1.code, applicant.course1.custom_float_1)))
     564
     565        if applicant.course2:
     566            if  applicant.jamb_score is None:
     567                raise Invalid(_("Total JAMB score not set."))
     568            if applicant.course2.custom_float_1 and applicant.course2.custom_float_1 > applicant.jamb_score:
     569                raise Invalid(_("You do not meet the minimum cutoff mark for course %s. Cutoff score for this course is %s. Please consider selecting an alternative choice." % (
     570                    applicant.course2.code, applicant.course2.custom_float_1)))
     571
     572        if applicant.course3:
     573            if  applicant.jamb_score is None:
     574                raise Invalid(_("Total JAMB score not set."))
     575            if applicant.course3.custom_float_1 and applicant.course3.custom_float_1 > applicant.jamb_score:
     576                raise Invalid(_("You do not meet the minimum cutoff mark for course %s. Cutoff score for this course is %s. Please consider selecting an alternative choice." % (
     577                    applicant.course3.code, applicant.course3.custom_float_1)))
     578
    557579        if applicant.course1 == applicant.course2:
    558580            raise Invalid(_("2nd choice course must differ from 1st choice course."))
Note: See TracChangeset for help on using the changeset viewer.