Changeset 13647 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 2 Feb 2016, 15:58:21 (9 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r13523 r13647 225 225 226 226 def _signatures(self): 227 return ( 228 [('I have selected the course on the advise of my Head of ' 229 'Department. <br>', _('Student\'s Signature'), '<br>')], 230 [('This student has satisfied the department\'s requirements. ' 231 'I recommend to approve the course registration. <br>', 232 _('Head of Department\'s Signature'), '<br>')], 233 [('' , _('Principal Assistant Registrar\'s Signature'), '<br>')], 234 [('', _('Director\'s Signature'))] 235 ) 227 if self.context.student.current_mode.endswith('_pt') \ 228 or self.context.student.current_mode == 'found': 229 return ( 230 [('I have selected the course on the advise of my Head of ' 231 'Department. <br>', _('Student\'s Signature'), '<br>')], 232 [('This student has satisfied the department\'s requirements. ' 233 'I recommend to approve the course registration. <br>', 234 _('Head of Department\'s Signature'), '<br>')], 235 [('' , _('Principal Assistant Registrar\'s Signature'), '<br>')], 236 [('', _('Director\'s Signature'))] 237 ) 238 if self.context.student.current_mode in ( 239 'de_ft', 'ug_ft', 'dp_ft', 'transfer'): 240 return ( 241 [('', _('Academic Adviser\'s Signature'), '<br>')], 242 [('', _('Faculty Officer\'s Signature'), '<br>')], 243 [('' , _('Student\'s Signature'), '<br>')], 244 ) 245 if self.context.student.current_mode in ('special_pg_ft', 'special_pg_pt'): 246 return ( 247 [('' , _('Student\'s Signature'), '<br>')], 248 [('', _('Major Supervisor\'s Signature'), '<br>')], 249 [('', _('Co-Supervisor\'s Signature'), '<br>')], 250 [('', _('Head of Department\'s Signature'), '<br>')], 251 [('', _('Secretary\'s Signature'), '<br>')], 252 ) 253 return None 254 236 255 237 256 def render(self): -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r13523 r13647 535 535 self.assertEqual(self.browser.headers['Status'], '200 Ok') 536 536 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 537 path = os.path.join(samples_dir(), 'ft_course_registration_slip.pdf') 538 open(path, 'wb').write(self.browser.contents) 539 print "Sample PDF ft_course_registration_slip.pdf written to %s" % path 540 541 self.certificate.study_mode = 'ug_pt' 542 self.browser.open(self.student_path + '/studycourse/100') 543 self.browser.getLink("Download course registration slip").click() 544 self.assertEqual(self.browser.headers['Status'], '200 Ok') 545 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 546 path = os.path.join(samples_dir(), 'pt_course_registration_slip.pdf') 547 open(path, 'wb').write(self.browser.contents) 548 print "Sample PDF pt_course_registration_slip.pdf written to %s" % path 549 550 self.certificate.study_mode = 'special_pg_ft' 551 self.browser.open(self.student_path + '/studycourse/100') 552 self.browser.getLink("Download course registration slip").click() 553 self.assertEqual(self.browser.headers['Status'], '200 Ok') 554 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 555 path = os.path.join(samples_dir(), 'pg_course_registration_slip.pdf') 556 open(path, 'wb').write(self.browser.contents) 557 print "Sample PDF pg_course_registration_slip.pdf written to %s" % path 537 558 538 559 def test_student_clearance(self):
Note: See TracChangeset for help on using the changeset viewer.