Changeset 10059 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 5 Apr 2013, 08:11:29 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py
r9501 r10059 71 71 return True 72 72 73 @property 74 def is_previous(self): 75 if self.__name__ == 'studycourse_2': 76 return True 77 if self.__name__ == 'studycourse_1' and \ 78 not self.__parent__.has_key('studycourse_2'): 79 return True 80 return False 81 73 82 def addStudentStudyLevel(self, cert, studylevel): 74 83 """Add a study level object. -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py
r10054 r10059 302 302 assert results[0] is self.app['students'][self.student.student_id] 303 303 304 # studycourse_1 is the previous course. 305 self.assertFalse(self.student['studycourse'].is_previous) 306 self.assertTrue(self.student['studycourse_1'].is_previous) 307 304 308 # Students can be transferred (only) two times. 305 309 error = self.student.transfer(self.certificate, … … 312 316 [u'accommodation', u'payments', u'studycourse', 313 317 u'studycourse_1', u'studycourse_2']) 318 319 # The studycourse with highest order number is the previous 320 # course. 321 self.assertFalse(self.student['studycourse'].is_previous) 322 self.assertFalse(self.student['studycourse_1'].is_previous) 323 self.assertTrue(self.student['studycourse_2'].is_previous) 314 324 315 325 # The students_catalog has been updated again.
Note: See TracChangeset for help on using the changeset viewer.