Changeset 8642 for main/waeup.kofa
- Timestamp:
- 7 Jun 2012, 10:06:02 (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/browser.py
r8595 r8642 1743 1743 'level_session', 'level_verdict') 1744 1744 pnav = 4 1745 max_credits = 50 1745 1746 1746 1747 def update(self): … … 1798 1799 @action(_('Register course list'), style='primary') 1799 1800 def registerCourses(self, **data): 1801 if self.total_credits > self.max_credits: 1802 self.flash(_('Maximum credits of ${a} exceeded.', 1803 mapping = {'a':self.max_credits})) 1804 return 1800 1805 IWorkflowInfo(self.context.getStudent()).fireTransition( 1801 1806 'register_courses') -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8621 r8642 1255 1255 self.student['studycourse']['200']['COURSE1'].mandatory = False 1256 1256 self.browser.open(self.student_path + '/studycourse/200/edit') 1257 # Now the student can remove the ticket 1257 # Course list can't be registered if total_credits exceeds max_credits 1258 self.student['studycourse']['200']['COURSE1'].credits = 60 1259 self.browser.getControl("Register course list").click() 1260 self.assertTrue('Maximum credits of 50 exceeded' in self.browser.contents) 1261 # Student can now remove the ticket 1258 1262 ctrl = self.browser.getControl(name='val_id') 1259 1263 ctrl.getControl(value='COURSE1').selected = True 1260 1264 self.browser.getControl("Remove selected", index=0).click() 1261 1265 self.assertTrue('Successfully removed' in self.browser.contents) 1266 # Course list can be registered, even if it's empty 1262 1267 self.browser.getControl("Register course list").click() 1263 1268 self.assertTrue('Course list has been registered' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.