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

Add direct entry study mode and customize _setStudyCourseAttributes.

File:
1 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):
Note: See TracChangeset for help on using the changeset viewer.