Changeset 13038
- Timestamp:
- 5 Jun 2015, 16:57:10 (9 years ago)
- Location:
- main/waeup.aaue/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/CHANGES.txt
r13037 r13038 4 4 1.2dev (unreleased) 5 5 =================== 6 7 * Students can open the customized pdf course registration slip only if they 8 have registered their course list. 6 9 7 10 * Activate and customize late course registration payment. -
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r12876 r13038 23 23 from waeup.kofa.interfaces import IKofaUtils 24 24 from waeup.kofa.students.interfaces import IStudentsUtils, IStudent 25 from waeup.kofa.students.workflow import PAID 25 from waeup.kofa.students.workflow import PAID, REGISTERED 26 26 from waeup.kofa.students.browser import ( 27 27 StartClearancePage, … … 105 105 'phone', 'adm_code', 'sex', 'email', 'date_of_birth', 106 106 'department', 'current_mode', 'current_level') 107 108 def update(self): 109 if self.context.student.state != REGISTERED \ 110 or self.context.student.current_level != self.context.level: 111 self.flash(_('Forbidden'), type="warning") 112 self.redirect(self.url(self.context)) 107 113 108 114 @property -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r13036 r13038 418 418 return 419 419 420 def test_student_course_registration(self): 421 # Uniben students see grade instead of score on all level pages 422 # and on course ticket page. 423 IWorkflowState(self.student).setState('school fee paid') 424 self.browser.open(self.login_path) 425 self.browser.getControl(name="form.login").value = self.student_id 426 self.browser.getControl(name="form.password").value = 'spwd' 427 self.browser.getControl("Login").click() 428 # Now students can add the current study level 429 self.browser.getLink("Study Course").click() 430 self.browser.getLink("Add course list").click() 431 self.assertMatches('...Add current level 100 (Year 1)...', 432 self.browser.contents) 433 self.browser.getControl("Create course list now").click() 434 # Students can open the customized pdf course registration slip 435 # if they have registered their course list 436 self.browser.open( 437 self.student_path + '/studycourse/100/course_registration_slip.pdf') 438 self.assertTrue('Forbidden' in self.browser.contents) 439 IWorkflowState(self.student).setState('courses registered') 440 self.browser.open(self.student_path + '/studycourse/100') 441 self.browser.getLink("Download course registration slip").click() 442 self.assertEqual(self.browser.headers['Status'], '200 Ok') 443 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
Note: See TracChangeset for help on using the changeset viewer.