Ignore:
Timestamp:
31 Jan 2022, 09:14:15 (3 years ago)
Author:
Henrik Bettermann
Message:

Implement new pg application form.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/applicants
Files:
3 edited

Legend:

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

    r16548 r16763  
    5151from waeup.aaue.applicants.interfaces import (
    5252    ICustomUGApplicant,
     53    ICustomPGApplicant,
    5354    ICustomUGApplicantEdit,
     55    ICustomPGApplicantEdit,
    5456    ITranscriptApplicant,
    5557    ICertificateRequest,
     
    155157
    156158PG_OMIT_FIELDS = (
    157     'fst_sit_fname',
    158     'fst_sit_no',
    159     'fst_sit_date',
    160     'fst_sit_type',
    161     'fst_sit_results',
    162     'scd_sit_fname',
    163     'scd_sit_no',
    164     'scd_sit_date',
    165     'scd_sit_type',
    166     'scd_sit_results',
    167     #'programme_type',
    168     'jamb_age',
    169     'jamb_subjects',
    170     'jamb_score',
    171     'jamb_reg_number',
    172     'aggregate'
     159
    173160    )
    174161PG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + (
    175     'jamb_subjects_list',) + PG_OMIT_FIELDS
     162    ) + PG_OMIT_FIELDS
    176163PG_OMIT_PDF_FIELDS = PG_OMIT_DISPLAY_FIELDS + PG_OMIT_FIELDS + (
    177       'reg_number','alr_fname', 'alr_no', 'alr_date',
    178       'alr_results', 'notice',
    179       'nysc_year',
    180       'nysc_location',
    181       'nysc_lga',
    182       'former_matric',
    183164      )
    184165PG_OMIT_MANAGE_FIELDS = (
    185     'special_application','jamb_subjects_list',) + PG_OMIT_FIELDS
     166    ) + PG_OMIT_FIELDS
    186167PG_OMIT_EDIT_FIELDS = PG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + (
    187     'student_id',
    188     'notice',
    189168    )
    190169
     
    269248            form_fields = grok.AutoFields(ICertificateRequest).omit(
    270249                'locked', 'suspended')
    271             #form_fields['dispatch_address'].custom_widget = BytesDisplayWidget
    272             #form_fields['perm_address'].custom_widget = BytesDisplayWidget
    273             return form_fields
    274         # AAUE is using the same interface for all regular applications.
    275         form_fields = grok.AutoFields(ICustomUGApplicant)
    276         if self.target is not None and self.target.startswith('pg'):
     250            return form_fields
     251        if self.target is not None and self.target in ('ptee','dsh',):
     252            form_fields = grok.AutoFields(ICustomUGApplicant)
     253            for field in PTEE_OMIT_DISPLAY_FIELDS:
     254                form_fields = form_fields.omit(field)
     255        elif self.target is not None and self.target in ('bridge', 'ude',):
     256            form_fields = grok.AutoFields(ICustomUGApplicant)
     257            for field in UDE_OMIT_DISPLAY_FIELDS:
     258                form_fields = form_fields.omit(field)
     259        elif self.target is not None and self.target.startswith('pg'):
     260            form_fields = grok.AutoFields(ICustomPGApplicant)
    277261            for field in PG_OMIT_DISPLAY_FIELDS:
    278262                form_fields = form_fields.omit(field)
    279         elif self.target is not None and self.target in ('ptee','dsh',):
    280             for field in PTEE_OMIT_DISPLAY_FIELDS:
    281                 form_fields = form_fields.omit(field)
    282         elif self.target is not None and self.target in ('bridge', 'ude',):
    283             for field in UDE_OMIT_DISPLAY_FIELDS:
    284                 form_fields = form_fields.omit(field)
    285263        else:
     264            form_fields = grok.AutoFields(ICustomUGApplicant)
    286265            for field in UG_OMIT_DISPLAY_FIELDS:
    287266                form_fields = form_fields.omit(field)
    288         form_fields['perm_address'].custom_widget = BytesDisplayWidget
    289         form_fields['notice'].custom_widget = BytesDisplayWidget
    290267        if not getattr(self.context, 'student_id'):
    291268            form_fields = form_fields.omit('student_id')
     
    367344        if self.target is not None and self.target.startswith('pg'):
    368345            for field in PG_OMIT_PDF_FIELDS:
     346                form_fields = grok.AutoFields(ICustomPGApplicant)
    369347                form_fields = form_fields.omit(field)
    370348        elif self.target is not None and self.target in ('ptee', 'dsh',):
     
    400378        if not getattr(self.context, 'screening_date'):
    401379            form_fields = form_fields.omit('screening_date')
     380        hqfields = ('hq_type', 'hq_fname', 'hq_matric_no',
     381                    'hq_degree', 'hq_school', 'hq_session', 'hq_disc')
     382        if not getattr(self.context, 'hq_type'):
     383            for hq in hqfields:
     384                form_fields = form_fields.omit(hq)
     385        if not getattr(self.context, 'hq_type2'):
     386            for hq in hqfields:
     387                form_fields = form_fields.omit(hq + '2')
     388        if not getattr(self.context, 'hq_type3'):
     389            for hq in hqfields:
     390                form_fields = form_fields.omit(hq + '3')
     391        if not getattr(self.context, 'hq_type4'):
     392            for hq in hqfields:
     393                form_fields = form_fields.omit(hq + '4')
    402394        return form_fields
    403395
     
    444436        form_fields = grok.AutoFields(ICustomUGApplicant)
    445437        if self.target is not None and self.target.startswith('pg'):
     438            form_fields = grok.AutoFields(ICustomPGApplicant)
    446439            for field in PG_OMIT_MANAGE_FIELDS:
    447440                form_fields = form_fields.omit(field)
     
    579572        form_fields = grok.AutoFields(ICustomUGApplicantEdit)
    580573        if self.target is not None and self.target.startswith('pg'):
     574            form_fields = grok.AutoFields(ICustomPGApplicantEdit)
    581575            for field in PG_OMIT_EDIT_FIELDS:
    582576                form_fields = form_fields.omit(field)
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py

    r16756 r16763  
    3434    contextual_reg_num_source,
    3535    IApplicantBaseData)
     36from waeup.kofa.refereeentries import RefereeEntryField
    3637from waeup.kofa.university.vocabularies import StudyModeSource
    3738from kofacustom.nigeria.applicants.interfaces import (
     
    614615        readonly = False,
    615616        )
    616     fst_sit_fname = schema.TextLine(
     617    hq_type2 = schema.Choice(
     618        title = _(u'Qualification Obtained'),
     619        required = False,
     620        readonly = False,
     621        vocabulary = high_qual,
     622        )
     623
     624    hq_fname2 = schema.TextLine(
    617625        title = _(u'Full Name'),
    618626        required = False,
    619627        readonly = False,
    620628        )
    621     fst_sit_no = schema.TextLine(
    622         title = _(u'Exam Number'),
    623         required = False,
    624         readonly = False,
    625         )
    626     fst_sit_date = FormattedDate(
    627         title = _(u'Exam Date'),
    628         required = False,
    629         readonly = False,
    630         show_year = True,
    631         )
    632     fst_sit_type = schema.Choice(
    633         title = _(u'Exam Type'),
    634         required = False,
    635         readonly = False,
    636         vocabulary = exam_types,
    637         )
    638     fst_sit_results = schema.List(
    639         title = _(u'Exam Results'),
    640         value_type = ResultEntryField(),
    641         required = False,
    642         readonly = False,
    643         defaultFactory=list,
    644         )
    645     scd_sit_fname = schema.TextLine(
     629
     630    hq_matric_no2 = schema.TextLine(
     631        title = _(u'Former Matric Number'),
     632        required = False,
     633        readonly = False,
     634        )
     635
     636    hq_degree2 = schema.Choice(
     637        title = _(u'Class of Degree'),
     638        required = False,
     639        readonly = False,
     640        vocabulary = high_grade,
     641        )
     642
     643    hq_school2 = schema.TextLine(
     644        title = _(u'Institution Attended'),
     645        required = False,
     646        readonly = False,
     647        )
     648
     649    hq_session2 = schema.TextLine(
     650        title = _(u'Years Attended'),
     651        required = False,
     652        readonly = False,
     653        )
     654
     655    hq_disc2 = schema.TextLine(
     656        title = _(u'Discipline'),
     657        required = False,
     658        readonly = False,
     659        )
     660
     661    hq_type3 = schema.Choice(
     662        title = _(u'Qualification Obtained'),
     663        required = False,
     664        readonly = False,
     665        vocabulary = high_qual,
     666        )
     667
     668    hq_fname3 = schema.TextLine(
    646669        title = _(u'Full Name'),
    647670        required = False,
    648671        readonly = False,
    649672        )
    650     scd_sit_no = schema.TextLine(
    651         title = _(u'Exam Number'),
    652         required = False,
    653         readonly = False,
    654         )
    655     scd_sit_date = FormattedDate(
    656         title = _(u'Exam Date'),
    657         required = False,
    658         readonly = False,
    659         show_year = True,
    660         )
    661     scd_sit_type = schema.Choice(
    662         title = _(u'Exam Type'),
    663         required = False,
    664         readonly = False,
    665         vocabulary = exam_types,
    666         )
    667     scd_sit_results = schema.List(
    668         title = _(u'Exam Results'),
    669         value_type = ResultEntryField(),
    670         required = False,
    671         readonly = False,
    672         defaultFactory=list,
    673         )
    674     # Replaced by first and second sitting
    675     #pp_school = schema.Choice(
    676     #    title = _(u'Qualification Obtained'),
    677     #    required = False,
    678     #    readonly = False,
    679     #    vocabulary = exam_types,
    680     #    )
     673
     674    hq_matric_no3 = schema.TextLine(
     675        title = _(u'Former Matric Number'),
     676        required = False,
     677        readonly = False,
     678        )
     679
     680    hq_degree3 = schema.Choice(
     681        title = _(u'Class of Degree'),
     682        required = False,
     683        readonly = False,
     684        vocabulary = high_grade,
     685        )
     686
     687    hq_school3 = schema.TextLine(
     688        title = _(u'Institution Attended'),
     689        required = False,
     690        readonly = False,
     691        )
     692
     693    hq_session3 = schema.TextLine(
     694        title = _(u'Years Attended'),
     695        required = False,
     696        readonly = False,
     697        )
     698
     699    hq_disc3 = schema.TextLine(
     700        title = _(u'Discipline'),
     701        required = False,
     702        readonly = False,
     703        )
     704
     705    hq_type4 = schema.Choice(
     706        title = _(u'Qualification Obtained'),
     707        required = False,
     708        readonly = False,
     709        vocabulary = high_qual,
     710        )
     711
     712    hq_fname4 = schema.TextLine(
     713        title = _(u'Full Name'),
     714        required = False,
     715        readonly = False,
     716        )
     717
     718    hq_matric_no4 = schema.TextLine(
     719        title = _(u'Former Matric Number'),
     720        required = False,
     721        readonly = False,
     722        )
     723
     724    hq_degree4 = schema.Choice(
     725        title = _(u'Class of Degree'),
     726        required = False,
     727        readonly = False,
     728        vocabulary = high_grade,
     729        )
     730
     731    hq_school4 = schema.TextLine(
     732        title = _(u'Institution Attended'),
     733        required = False,
     734        readonly = False,
     735        )
     736
     737    hq_session4 = schema.TextLine(
     738        title = _(u'Years Attended'),
     739        required = False,
     740        readonly = False,
     741        )
     742
     743    hq_disc4 = schema.TextLine(
     744        title = _(u'Discipline'),
     745        required = False,
     746        readonly = False,
     747        )
    681748    presently_inst = schema.TextLine(
    682749        title = _(u'If yes, name of institution'),
     
    749816        readonly = False,
    750817        )
     818    former_matric = schema.TextLine(
     819        title = _(u'If yes, matric number'),
     820        required = False,
     821        readonly = False,
     822        )
    751823    notice = schema.Text(
    752824        title = _(u'Notice'),
     
    781853        default = False,
    782854        required = False,
     855        )
     856
     857    referees = schema.List(
     858        title = _(u'Referees'),
     859        value_type = RefereeEntryField(),
     860        required = False,
     861        defaultFactory=list,
    783862        )
    784863
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py

    r16675 r16763  
    6060        'form.hq_type2': _(u'2nd Higher Education Record'),
    6161        'form.hq_type3': _(u'3rd Higher Education Record'),
     62        'form.hq_type4': _(u'4th Higher Education Record'),
     63        'form.hq_type5': _(u'5th Higher Education Record'),
     64        'form.hq_type6': _(u'6th Higher Education Record'),
    6265        'form.presently': _(u'Course or Programme Presently Attending'),
    6366        'form.nysc_year': _(u'NYSC Information'),
    64         'form.employer': _(u'Employment History'),
     67        'form.employer': _(u'Employment History (where applicable)'),
    6568        #'form.jamb_reg_number': _(u'JAMB Data'),
    6669        'form.notice': _(u'Application Process Information'),
     
    6871        'form.presently_inst': _(u'Presently attending a course or programme'),
    6972        'form.olevel_type': _(u"'O' Level Records"),
    70         'form.former_matric': _(u'Former Student'),
     73        'form.former_matric': _(u'Graduate of AAU, Ekpoma'),
     74        'form.referees': _(u'Referees'),
    7175        }
    7276
Note: See TracChangeset for help on using the changeset viewer.