Changeset 17127


Ignore:
Timestamp:
12 Oct 2022, 10:10:37 (2 years ago)
Author:
Henrik Bettermann
Message:

Add direct entry study mode and customize _setStudyCourseAttributes.

Location:
main/kofacustom.unidel/trunk/src/kofacustom/unidel
Files:
3 edited

Legend:

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

    r16721 r17127  
    3131    grok.provides(ICustomApplicant)
    3232
     33    def _setStudyCourseAttributes(self, studycourse):
     34        if self.applicant_id.startswith('pude'):
     35            studycourse.entry_mode = u'de'
     36            studycourse.current_level = 200
     37        else:
     38            studycourse.entry_mode = self.course_admitted.study_mode
     39            studycourse.current_level = self.course_admitted.start_level
     40        studycourse.certificate = self.course_admitted
     41        studycourse.entry_session = self.__parent__.year
     42        studycourse.current_session = self.__parent__.year
     43        return
     44
    3345# Set all attributes of CustomApplicant required in ICustomApplicant as field
    3446# properties. Doing this, we do not have to set initial attributes
     
    3648# set.
    3749CustomApplicant = attrs_to_fields(CustomApplicant)
     50
    3851
    3952class CustomApplicantFactory(ApplicantFactory):
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/applicants/utils.py

    r17115 r17127  
    3737        'dp_ft': ['Diploma Programmes Full-Time Programmes', 'DP'],
    3838        'dp_pt': ['Diploma Programmes Part-Time Programmes', 'DP'],
    39         'de': ['Direct Entry Programmes', 'DEPT'],
     39        'de': ['Direct Entry Programmes', 'DEP'],
    4040        }
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/utils/utils.py

    r17124 r17127  
    6262        'dp_ft': 'Full-Time Diploma Programmes',
    6363        'dp_pt': 'Part-Time Diploma Programmes',
     64        'de': 'Direct Entry Programmes',
    6465        }
    6566
Note: See TracChangeset for help on using the changeset viewer.