Changeset 9136 for main/waeup.kofa
- Timestamp:
- 31 Aug 2012, 15:23:50 (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/student.py
r9132 r9136 144 144 145 145 def transfer(self, certificate, current_session=None, 146 current_level=None, current_verdict=None, previous_verdict=None, 147 entry_session=None): 146 current_level=None, current_verdict=None, previous_verdict=None): 148 147 """ Creates a new studycourse and backups the old one. 149 148 … … 156 155 studycourse.current_verdict = current_verdict 157 156 studycourse.previous_verdict = previous_verdict 158 studycourse.entry_session = entry_session159 157 old = self['studycourse'] 158 studycourse.entry_session = old.entry_session 160 159 # Students can be transferred only two times. 161 160 if 'studycourse_1' in self.keys(): -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py
r9132 r9136 268 268 RequiredMissing, self.student.transfer, self.certificate2) 269 269 success = self.student.transfer(self.certificate2, 270 current_session=2013 , entry_session=2010)270 current_session=2013) 271 271 self.assertEqual(self.student['studycourse_1'].certificate.code, 'CERT1') 272 272 self.assertEqual(self.student['studycourse'].certificate.code, 'CERT2') 273 273 self.assertEqual(self.student['studycourse_1'].current_session, 2012) 274 274 self.assertEqual(self.student['studycourse'].current_session, 2013) 275 self.assertEqual(self.student['studycourse'].entry_session, 276 self.student['studycourse_1'].entry_session) 275 277 self.assertEqual(self.student['studycourse_1'].__name__, 'studycourse_1') 276 278 logfile = os.path.join( … … 296 298 # Students can be transferred (only) two times. 297 299 success = self.student.transfer(self.certificate, 298 current_session=2013 , entry_session=2010)300 current_session=2013) 299 301 self.assertTrue(success) 300 302 success = self.student.transfer(self.certificate2, 301 current_session=2013 , entry_session=2010)303 current_session=2013) 302 304 self.assertFalse(success) 303 305 self.assertEqual([i for i in self.student.keys()],
Note: See TracChangeset for help on using the changeset viewer.