Changeset 9132


Ignore:
Timestamp:
31 Aug 2012, 14:52:33 (12 years ago)
Author:
Henrik Bettermann
Message:

Also previous_verdict and entry_session must be set.

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

    r9131 r9132  
    144144
    145145    def transfer(self, certificate, current_session=None,
    146         current_level=None, current_verdict=None):
     146        current_level=None, current_verdict=None, previous_verdict=None,
     147        entry_session=None):
    147148        """ Creates a new studycourse and backups the old one.
    148149
     
    154155        studycourse.current_level = current_level
    155156        studycourse.current_verdict = current_verdict
     157        studycourse.previous_verdict = previous_verdict
     158        studycourse.entry_session = entry_session
    156159        old = self['studycourse']
    157160        # Students can be transferred only two times.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py

    r9131 r9132  
    267267        self.assertRaises(
    268268            RequiredMissing, self.student.transfer, self.certificate2)
    269         success = self.student.transfer(self.certificate2, current_session=2013)
     269        success = self.student.transfer(self.certificate2,
     270            current_session=2013, entry_session=2010)
    270271        self.assertEqual(self.student['studycourse_1'].certificate.code, 'CERT1')
    271272        self.assertEqual(self.student['studycourse'].certificate.code, 'CERT2')
     
    294295
    295296        # Students can be transferred (only) two times.
    296         success = self.student.transfer(self.certificate, current_session=2013)
     297        success = self.student.transfer(self.certificate,
     298            current_session=2013, entry_session=2010)
    297299        self.assertTrue(success)
    298         success = self.student.transfer(self.certificate2, current_session=2013)
     300        success = self.student.transfer(self.certificate2,
     301            current_session=2013, entry_session=2010)
    299302        self.assertFalse(success)
    300303        self.assertEqual([i for i in self.student.keys()],
Note: See TracChangeset for help on using the changeset viewer.