Changeset 15507 for main/waeup.fceokene
- Timestamp:
- 22 Jul 2019, 19:22:40 (5 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/browser/pdf.py
r9982 r15507 28 28 header_logo_path = os.path.join( 29 29 os.path.dirname(__file__), 'static', 'pdf_logo.jpg') 30 30 watermark_path = os.path.join( 31 os.path.dirname(__file__), 'static', 'pdf_watermark.jpg') 32 watermark_pos = [130, 190] 31 33 logo_pos = [510, 750, 60] 32 34 … … 46 48 47 49 logo_left_pos = [15, 750, 60] 48 49 50 -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/browser.py
r15304 r15507 24 24 from waeup.kofa.interfaces import MessageFactory as _ 25 25 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 26 from waeup.kofa.students.interfaces import IStudentsUtils 26 27 from waeup.kofa.students.browser import ( 27 28 StartClearancePage, BedTicketAddPage, … … 48 49 def label(self): 49 50 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 50 return translate(_('Admission Letter of'),51 'waeup.kofa', target_language=portal_language) \52 + ' %s' % self.context.display_fullname53 54 @property55 def label(self):56 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE57 51 line0 = '' 58 52 if self.context.student.current_mode.startswith('ug'): … … 62 56 + ' %s' % self.context.display_fullname 63 57 return '%s%s' % (line0, line1) 58 59 @property 60 def _post_text(self): 61 return """You should note the following as conditions for admission: 62 63 1. At the point of registration, you will be required to present the originals of your certificate(s), Jamb Original Result, a Birth Certificate or a Declaration of Age Certificate and Evidence of Citizenship Certificate 64 65 2. Please note that the name by which you are hereby admitted and by which you will be registered is the one which will appear on any certificate that the Federal College of Education, Okene may issue to you on successful completion of your programme except there was a change of name by sworn affidavit or marriage certificate in addition to newspaper publication. 66 67 3. You are hereby informed that all fees must be paid at the beginning of the academic session. The current school fees can be obtained from the College website. 68 69 4. You will present at the time of registration the Medical Certificate of Fitness from the Federal College of Education, Okene Medical Centre. 70 71 5. Please, note that due to shortage of accommodations, students shall be given accommodations on first come, first serve basis. 72 73 6. The offer is not transferable to another session. 74 75 7. You will sign a declaration of good conduct except by deferment on your arrival at the College. 76 77 Accept my congratulations. 78 79 Yours faithfully 80 81 M. S. Adoke 82 Deputy Registrar (Admissions) 83 For: Registrar 84 """ 85 86 87 def render(self): 88 students_utils = getUtility(IStudentsUtils) 89 return students_utils.renderPDFAdmissionLetter(self, 90 self.context.student, omit_fields=self.omit_fields, 91 post_text=self._post_text) 64 92 65 93 class CustomOnlinePaymentDisplayFormPage(NigeriaOnlinePaymentDisplayFormPage): -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r15300 r15507 378 378 return 379 379 380 def test_admission_slip _link(self):380 def test_admission_slip(self): 381 381 # Login 382 382 IWorkflowState(self.student).setState('admitted') … … 391 391 self.assertTrue( 392 392 'Download admission letter' in self.browser.contents) 393 # Students can open admission letter 394 self.browser.getLink("Download admission letter").click() 395 self.assertEqual(self.browser.headers['Status'], '200 Ok') 396 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 397 path = os.path.join(samples_dir(), 'admission_slip.pdf') 398 open(path, 'wb').write(self.browser.contents) 399 print "Sample PDF admission_slip.pdf written to %s" % path 393 400 return 394 401
Note: See TracChangeset for help on using the changeset viewer.