Changeset 12846 for main/waeup.uniben/trunk/src/waeup/uniben/students
- Timestamp:
- 2 Apr 2015, 16:06:57 (10 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r12845 r12846 123 123 'phone', 'adm_code', 'email', 'date_of_birth') 124 124 125 def _sig natures(self):125 def _sigsInFooter(self): 126 126 isStudent = getattr( 127 127 self.request.principal, 'user_type', None) == 'student' 128 128 if not isStudent and self.context.state in (CLEARED, RETURNING): 129 return ([_('Student Signature')], 130 [_('Clearance Officer Signature')]) 131 return 129 return (_('Date, Student Signature'), 130 _('Date, Clearance Officer Signature'), 131 ) 132 return () 132 133 133 134 def render(self): -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r12845 r12846 97 97 self.assertMatches('...First Sitting Record...', 98 98 self.browser.contents) 99 # We want to see the signature fields. 100 IWorkflowState(self.student).setState('returning') 99 101 self.browser.open(self.student_path + '/clearance_slip.pdf') 100 102 self.assertEqual(self.browser.headers['Status'], '200 Ok') 101 103 self.assertEqual(self.browser.headers['Content-Type'], 102 104 'application/pdf') 105 path = os.path.join(samples_dir(), 'clearance_slip.pdf') 106 open(path, 'wb').write(self.browser.contents) 107 print "Sample PDF clearance_slip.pdf written to %s" % path 103 108 104 109 def test_student_access(self):
Note: See TracChangeset for help on using the changeset viewer.