- Timestamp:
- 6 May 2020, 13:49:45 (5 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py
r15859 r16087 122 122 IWorkflowInfo(self.student).fireTransition('pay_school_fee') 123 123 self.assertFalse(self.student.library) 124 125 def test_student_basedata_slip(self): 126 IWorkflowState(self.student).setState('school fee paid') 127 self.browser.open(self.login_path) 128 self.browser.getControl(name="form.login").value = self.student_id 129 self.browser.getControl(name="form.password").value = 'spwd' 130 self.browser.getControl("Login").click() 131 # Students can open base data slip 132 # (no button available in base package) 133 pdf_url = '%s/basedata_slip.pdf' % self.studycourse_path 134 self.browser.open(pdf_url) 135 self.assertEqual(self.browser.headers['Status'], '200 Ok') 136 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 137 path = os.path.join(samples_dir(), 'basedata_slip.pdf') 138 open(path, 'wb').write(self.browser.contents) 139 print "Sample PDF basedata_slip.pdf written to %s" % path -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/viewlets.py
r16031 r16087 23 23 from waeup.kofa.students.interfaces import IStudent, IStudentsUtils 24 24 from kofacustom.iuokada.students.interfaces import ( 25 ICustomStudentStudyCourse, ICustomStudentStudyLevel, ICustomStudent) 25 ICustomStudentStudyCourse, ICustomStudentStudyLevel, ICustomStudent, 26 ICustomStudentStudyCourse) 26 27 from waeup.kofa.students.fileviewlets import ( 27 28 StudentFileDisplay, StudentFileUpload, StudentImage) … … 42 43 target = 'switch_library_access' 43 44 icon = 'actionicon_book.png' 45 46 class BaseDataSlipActionButton(ManageActionButton): 47 grok.order(10) 48 grok.context(ICustomStudentStudyCourse) 49 grok.view(StudyCourseDisplayFormPage) 50 grok.require('waeup.viewStudent') 51 text = _('Download base data slip') 52 target = 'basedata_slip.pdf' 53 icon = 'actionicon_pdf.png' 44 54 45 55 class AddBalancePaymentActionButton(AddBalancePaymentActionButton):
Note: See TracChangeset for help on using the changeset viewer.