Changeset 9482


Ignore:
Timestamp:
31 Oct 2012, 08:25:49 (12 years ago)
Author:
Henrik Bettermann
Message:

Customize _setStudyCourseAttributes. DE students start in level 200 and their entry mode is different from the certificates study mode.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/applicant.py

    r9072 r9482  
    3838        'lga', 'nationality', 'perm_address'] 
    3939
     40    def _setStudyCourseAttributes(self, studycourse):
     41        if self.applicant_id.startswith('pude'):
     42            studycourse.entry_mode = u'de_ft'
     43            studycourse.current_level = 200
     44        else:
     45            studycourse.entry_mode = self.course_admitted.study_mode
     46            studycourse.current_level = self.course_admitted.start_level
     47        studycourse.certificate = self.course_admitted
     48        studycourse.entry_session = self.__parent__.year
     49        studycourse.current_session = self.__parent__.year
     50        return
     51
    4052# Set all attributes of NigeriaApplicant required in INigeriaApplicant as field
    4153# properties. Doing this, we do not have to set initial attributes
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/browser.py

    r9076 r9482  
    203203                form_fields = form_fields.omit(field)
    204204        elif target is not None and target.startswith('pude'):
    205             form_fields = grok.AutoFields(INigeriaUGApplicant)
     205            form_fields = grok.AutoFields(INigeriaUGApplicantEdit)
    206206            for field in PUDE_OMIT_EDIT_FIELDS:
    207207                form_fields = form_fields.omit(field)
Note: See TracChangeset for help on using the changeset viewer.