Changeset 9252 for main/waeup.kofa/trunk/src
- Timestamp:
- 28 Sep 2012, 08:21:08 (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
r9217 r9252 2058 2058 @action(_('Register course list'), style='primary') 2059 2059 def registerCourses(self, **data): 2060 if self.context.student.is_postgrad: 2061 self.flash(_( 2062 "You are a postgraduate student, " 2063 "your course list can't bee registered.")) 2064 self.redirect(self.url(self.context)) 2065 return 2060 2066 if self.total_credits > self.max_credits: 2061 2067 self.flash(_('Maximum credits of ${a} exceeded.', -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9238 r9252 1322 1322 return 1323 1323 1324 def test_postgraduate_student_access(self): 1325 self.certificate.study_mode = 'pg_ft' 1326 self.certificate.start_level = 999 1327 self.certificate.end_level = 999 1328 self.student['studycourse'].current_level = 999 1329 IWorkflowState(self.student).setState('school fee paid') 1330 self.certificate.study_mode = 'pg_ft' 1331 self.browser.open(self.login_path) 1332 self.browser.getControl(name="form.login").value = self.student_id 1333 self.browser.getControl(name="form.password").value = 'spwd' 1334 self.browser.getControl("Login").click() 1335 self.assertTrue( 1336 'You logged in.' in self.browser.contents) 1337 # Now students can add the current study level 1338 self.browser.getLink("Study Course").click() 1339 self.browser.getLink("Add course list").click() 1340 self.assertMatches('...Add current level Postgraduate Level...', 1341 self.browser.contents) 1342 self.browser.getControl("Create course list now").click() 1343 # A level with one course ticket was created 1344 self.assertEqual(self.student['studycourse']['999'].number_of_tickets, 0) 1345 self.browser.getLink("999").click() 1346 self.browser.getLink("Edit course list").click() 1347 self.browser.getControl("Add course ticket").click() 1348 self.browser.getControl(name="form.course").value = ['COURSE1'] 1349 self.browser.getControl("Add course ticket").click() 1350 self.assertMatches('...Successfully added COURSE1...', 1351 self.browser.contents) 1352 # Postgraduate students can't register course lists 1353 self.browser.getControl("Register course list").click() 1354 self.assertTrue("your course list can't bee registered" 1355 in self.browser.contents) 1356 self.assertEqual(self.student.state, 'school fee paid') 1357 return 1358 1324 1359 def test_student_clearance_wo_clrcode(self): 1325 1360 IWorkflowState(self.student).setState('clearance started') … … 1653 1688 return 1654 1689 1655 def test_ student_postgraduate_payments(self):1690 def test_postgraduate_student_payments(self): 1656 1691 self.certificate.study_mode = 'pg_ft' 1657 1692 self.certificate.start_level = 999
Note: See TracChangeset for help on using the changeset viewer.