Changeset 12122 for main/waeup.uniben/trunk/src/waeup
- Timestamp:
- 3 Dec 2014, 06:43:26 (10 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r12121 r12122 163 163 return 164 164 165 166 def update(self): 167 if self.context.student.state != REQUESTED \ 168 or not self.context.student.physical_clearance_date: 169 self.flash(_('Forbidden'), type="warning") 170 self.redirect(self.url(self.context)) 171 165 172 def render(self): 166 173 studentview = StudentBasePDFFormPage(self.context.student, -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r12121 r12122 171 171 attr="secr_cults.jpg") 172 172 file_store.createFile(file_id, StringIO(secr_cults)) 173 # Clearance invitation letter is not yet available 174 self.browser.open(self.clearance_path) 175 self.assertFalse('invitation slip' in self.browser.contents) 176 self.browser.open(self.student_path + '/clearance_invitation_slip.pdf') 177 self.assertTrue('Forbidden' in self.browser.contents) 173 178 self.browser.open(self.edit_clearance_path) 174 179 self.browser.getControl("Save and request clearance").click() 175 176 180 self.assertTrue('Clearance has been requested' 177 181 in self.browser.contents) 178 # Student can export physical_clearance.slip182 # Now student can export physical_clearance.slip 179 183 self.app['configuration'].name = u'University of Benin' 180 184 self.student.physical_clearance_date = u'January 5th, 2015' -
main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
r12121 r12122 67 67 text = _('Download clearance invitation slip') 68 68 target = 'clearance_invitation_slip.pdf' 69 70 @property 71 def target_url(self): 72 if self.context.student.state == REQUESTED \ 73 and self.context.student.physical_clearance_date: 74 return self.view.url(self.view.context, self.target) 75 return False 69 76 70 77
Note: See TracChangeset for help on using the changeset viewer.