Changeset 13051 for main/waeup.aaue/trunk
- Timestamp:
- 15 Jun 2015, 15:04:19 (10 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r13038 r13051 108 108 def update(self): 109 109 if self.context.student.state != REGISTERED \ 110 or self.context.student.current_level != self.context.level:110 and self.context.student.current_level == self.context.level: 111 111 self.flash(_('Forbidden'), type="warning") 112 112 self.redirect(self.url(self.context)) -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r13043 r13051 421 421 422 422 def test_student_course_registration(self): 423 # Uniben students see grade instead of score on all level pages424 # and on course ticket page.425 423 IWorkflowState(self.student).setState('school fee paid') 426 424 self.browser.open(self.login_path) … … 434 432 self.browser.contents) 435 433 self.browser.getControl("Create course list now").click() 436 # Students can open the customized pdf course registration slip 437 # if they have registered their course list 434 # Students can't open the customized pdf course registration slip 438 435 self.browser.open( 439 436 self.student_path + '/studycourse/100/course_registration_slip.pdf') 440 437 self.assertTrue('Forbidden' in self.browser.contents) 438 # They can open slips from the previous session ... 439 self.student['studycourse'].current_level = 200 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') 444 # or if they have registered their course list 445 self.student['studycourse'].current_level = 200 441 446 IWorkflowState(self.student).setState('courses registered') 442 447 self.browser.open(self.student_path + '/studycourse/100') -
main/waeup.aaue/trunk/src/waeup/aaue/students/viewlets.py
r13039 r13051 93 93 return '' 94 94 if self.context.student.state != REGISTERED \ 95 or self.context.student.current_level != self.context.level:95 and self.context.student.current_level == self.context.level: 96 96 return '' 97 97 return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.