Changeset 16292 for main/kofacustom.iuokada/trunk
- Timestamp:
- 30 Oct 2020, 12:36:49 (4 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/tests/test_browser.py
r16233 r16292 93 93 self.browser.getControl(name="form.sex").value = ['m'] 94 94 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 95 self.browser.getControl(name="form.perm_address").value = 'Adresse' 95 96 96 97 def test_manage_application(self): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py
r16270 r16292 218 218 self.browser.getControl(name="form.sex").value = ['m'] 219 219 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 220 self.browser.getControl(name="form.perm_address").value = 'Adresse' 220 221 221 222 def setUp(self): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/locales/en/LC_MESSAGES/waeup.kofa.po
r16256 r16292 143 143 144 144 msgid "Personal Data of" 145 msgstr " Registration Bio Dataof"145 msgstr "Course Registration Clearance of" -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
r16288 r16292 154 154 """Deliver a PDF base and personal data slip. 155 155 """ 156 grok.name('course_registration_clearance.pdf') 156 157 omit_fields = ( 157 158 'phone', 'email', … … 164 165 form_fields = grok.AutoFields(ICustomStudentPersonal) 165 166 167 def _signatures(self): 168 return ([('I certify that the above named student has satisfied the financial requirements for registration.', 'Name and Signature of Bursary Staff', '<br><br>')], 169 [('I certify that the credentials of the student have been screened by me and the student is hereby cleared.', 'Name and Signature of Registry Staff', '<br><br>')], 170 [('I certify that the above named student has registered with the Library.', 'Name and Signature of Library Staff', '<br><br>')], 171 [('I certify that the above named student has been registered with the college. ', 'Name and Signature of College Officer', '<br><br>')], 172 [('I certify that the above named student has completed his/her ICT registration. ', 'Name and Signature of ICT Staff', '<br><br>')], 173 [('Eligibility/Congratulation Station', 'Name and Signature of Registrar', '')], 174 ) 175 166 176 def render(self): 167 177 studentview = StudentBasePDFFormPage(self.context.student, … … 169 179 students_utils = getUtility(IStudentsUtils) 170 180 171 watermark_path = os.path.join( 172 os.path.dirname(__file__), 'static', 'watermark.pdf') 173 watermark = open(watermark_path, 'rb') 174 file_path = os.path.join( 175 os.path.dirname(__file__), 'static', 'biodataPage2.pdf') 176 file = open(file_path, 'rb') 177 mergefiles = [file,] 181 #watermark_path = os.path.join( 182 # os.path.dirname(__file__), 'static', 'watermark.pdf') 183 #watermark = open(watermark_path, 'rb') 184 #file_path = os.path.join( 185 # os.path.dirname(__file__), 'static', 'biodataPage2.pdf') 186 #file = open(file_path, 'rb') 187 #mergefiles = [file,] 188 178 189 return students_utils.renderPDF( 179 self, ' personal_slip.pdf',190 self, 'course_registration_clearance.pdf', 180 191 self.context.student, studentview, 181 192 omit_fields=self.omit_fields, 182 mergefiles=mergefiles, 183 watermark=watermark) 193 signatures=self._signatures(), 194 pagebreak=True, 195 # mergefiles=mergefiles, 196 # watermark=watermark 197 ) 184 198 185 199 class CustomAccommodationDisplayFormPage(NigeriaAccommodationDisplayFormPage): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py
r16264 r16292 158 158 # Students can open base data slip 159 159 # (no button available in base package) 160 pdf_url = '%s/ personal_slip.pdf' % self.student_path160 pdf_url = '%s/course_registration_clearance.pdf' % self.student_path 161 161 self.browser.open(pdf_url) 162 162 self.assertEqual(self.browser.headers['Status'], '200 Ok') 163 163 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 164 path = os.path.join(samples_dir(), ' personal_slip.pdf')164 path = os.path.join(samples_dir(), 'course_registration_clearance.pdf') 165 165 open(path, 'wb').write(self.browser.contents) 166 print "Sample PDF personal_slip.pdf written to %s" % path166 print "Sample PDF course_registration_clearance.pdf written to %s" % path 167 167 168 168 def test_student_admission_letter(self):
Note: See TracChangeset for help on using the changeset viewer.