Ignore:
Timestamp:
31 Oct 2012, 07:29:33 (12 years ago)
Author:
Henrik Bettermann
Message:

Define private method to set entry_mode and current_level. We need this for Uniben de students.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py

    r9391 r9480  
    103103        return kofa_utils.fullname(self.firstname, self.lastname, middlename)
    104104
     105    def _setStudyCourseAttributes(self, studycourse):
     106        studycourse.entry_mode = self.course_admitted.study_mode
     107        studycourse.current_level = self.course_admitted.start_level
     108        studycourse.certificate = self.course_admitted
     109        studycourse.entry_session = self.__parent__.year
     110        studycourse.current_session = self.__parent__.year
     111        return
     112
    105113    def createStudent(self, view=None):
    106114        """Create a student, fill with base data, create an application slip
     
    142150        # Set password
    143151        IUserAccount(student).setPassword(self.application_number)
    144         # Save the certificate and set session attributes
    145         student['studycourse'].certificate = self.course_admitted
    146         student['studycourse'].entry_mode = self.course_admitted.study_mode
    147         student['studycourse'].entry_session = self.__parent__.year
    148         student['studycourse'].current_session = self.__parent__.year
    149         student['studycourse'].current_level = self.course_admitted.start_level
     152        # Save the certificate and set study course attributes
     153        self._setStudyCourseAttributes(student['studycourse'])
    150154        self._copyPassportImage(student)
    151155        # Update the catalog
Note: See TracChangeset for help on using the changeset viewer.