Changeset 15429 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 27 May 2019, 10:51:04 (6 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r15428 r15429 329 329 'book fee have been paid.' 330 330 % course.code)) 331 # We check if there exists a certificate course in the certificate 332 # container which refers to the course. If such an object does 333 # not exist, students and managers will be prevented from registering 334 # the corresponding course. 335 cert = self.__parent__.certificate 336 ticket_allowed = False 337 for val in cert.values(): 338 if val.course == course: 339 ticket_allowed = True 340 break 341 if not ticket_allowed: 342 raise TicketError( 343 _('%s is not part of the %s curriculum.' 344 % (course.code, cert.code))) 331 345 ticket.code = course.code 332 346 ticket.title = course.title -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r15428 r15429 1338 1338 self.student['studycourse']['200']['COURSE1'].outstanding = True 1339 1339 self.browser.getControl("Add course ticket").click() 1340 self.assertMatches( 1341 '...Successfully added COURSE2...', self.browser.contents) 1340 # Corresponding certificate course is missing 1341 self.assertTrue( 1342 'COURSE2 is not part of the CERT1 curriculum.' 1343 in self.browser.contents) 1344 self.app['faculties']['fac1']['dep1'].certificates[ 1345 'CERT1'].addCertCourse(self.course, level=100) 1346 self.browser.getControl("Add course ticket").click() 1347 self.assertTrue( 1348 'Successfully added COURSE2' in self.browser.contents) 1342 1349 return 1343 1350
Note: See TracChangeset for help on using the changeset viewer.