Changeset 17627 for main


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

Implement cutoff mark for application.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
5 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."))
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py

    r16763 r17627  
    5353    SEPARATORS_DICT = {
    5454        'form.applicant_id': _(u'Base Data'),
    55         #'form.course1': _(u'Programmes/Courses Desired'),
     55        'form.course1': _(u'JAMB Course: '),
    5656        'form.fst_sit_fname': _(u'1st Sitting'),
    5757        'form.scd_sit_fname': _(u'2nd Sitting'),
  • main/waeup.aaue/trunk/src/waeup/aaue/browser/pages.py

    r17428 r17627  
    2121    SessionConfigurationManageFormPage,
    2222    ConfigurationContainerManageFormPage,
    23     DatacenterPage, ExportCSVPage)
     23    DatacenterPage, ExportCSVPage,
     24    CertificatePage, CertificateManageFormPage)
    2425from waeup.kofa.browser.reports import ReportsContainerPage
    2526from waeup.kofa.interfaces import IConfigurationContainer
     27from waeup.kofa.university.interfaces import ICertificate
    2628from waeup.aaue.interfaces import (
    2729    ICustomSessionConfiguration,
    2830    ICustomSessionConfigurationAdd)
     31
     32class CustomCertificatePage(CertificatePage):
     33    """Index page for certificates.
     34    """
     35    form_fields = grok.AutoFields(ICertificate).omit(
     36        'custom_float_2',
     37        'school_fee_1',
     38        'school_fee_2',
     39        'school_fee_3',
     40        'school_fee_4',
     41        'custom_textline_1',
     42        'custom_textline_2',
     43        )
     44
     45class CustomCertificateManageFormPage(CertificateManageFormPage):
     46    """Manage the properties of a `Certificate` instance.
     47    """
     48    form_fields = grok.AutoFields(ICertificate).omit(
     49        'ratio',
     50        'custom_float_2',
     51        'school_fee_1',
     52        'school_fee_2',
     53        'school_fee_3',
     54        'school_fee_4',
     55        'custom_textline_1',
     56        'custom_textline_2',
     57        'code')
    2958
    3059class CustomConfigurationContainerManageFormPage(
  • main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/waeup.kofa.po

    r17431 r17627  
    125125msgstr "<b>Units: ${a}</b>"
    126126
    127 #: school_fee_1
    128 msgid "Initial School Fee"
    129 msgstr "School Fees 1 (not used)"
    130 
    131 #: school_fee_2
    132 msgid "Returning School Fee"
    133 msgstr "School Fees 2 (not used)"
    134 
    135 #: school_fee_3
    136 msgid "Foreigner Initial School Fee"
    137 msgstr "School Fees 3 (not used)"
    138 
    139 #: school_fee_4
    140 msgid "Foreigner Returning School Fee"
    141 msgstr "School Fees 4 (not used)"
    142 
    143127msgid "Registration Number"
    144128msgstr "(JAMB) Registration Number"
     
    206190msgstr "Result Sheet"
    207191
     192#: school_fee_1
     193msgid "Initial School Fee"
     194msgstr "School Fees 1 (not used)"
     195
     196#: school_fee_2
     197msgid "Returning School Fee"
     198msgstr "School Fees 2 (not used)"
     199
     200#: school_fee_3
     201msgid "Foreigner Initial School Fee"
     202msgstr "School Fees 3 (not used)"
     203
     204#: school_fee_4
     205msgid "Foreigner Returning School Fee"
     206msgstr "School Fees 4 (not used)"
     207
    208208#: waeup/kofa/university/interfaces.py:311
    209209msgid "Custom Float 1 (not used)"
    210 msgstr "Cumulative Units Taken"
    211 
    212 #: waeup/kofa/university/interfaces.py:316
    213 msgid "Custom Float 2 (not used)"
    214 msgstr "Cumulative Units Passed"
     210msgstr "Cutoff JAMB Score"
Note: See TracChangeset for help on using the changeset viewer.