Changeset 17362 for main/waeup.uniben/trunk/src/waeup/uniben/students
- Timestamp:
- 25 Mar 2023, 18:00:57 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r17255 r17362 17 17 ## 18 18 import grok 19 import os 19 20 from datetime import datetime 20 21 from zope.i18n import translate … … 41 42 StartClearancePage, 42 43 StudentFilesUploadPage, 43 StudyCourseTranscriptPage) 44 StudyCourseTranscriptPage, 45 ExportPDFAdmissionSlip) 44 46 from waeup.kofa.students.workflow import (CREATED, ADMITTED, PAID, 45 47 CLEARANCE, REQUESTED, RETURNING, CLEARED, REGISTERED, VALIDATED, … … 979 981 self.context.student.depcode) 980 982 return DEPLINKS[facdepkey] 983 984 class CustomExportPDFAdmissionSlip(ExportPDFAdmissionSlip): 985 """Deliver a PDF Admission slip. 986 """ 987 988 @property 989 def post_text_pt(self): 990 datelist = self.context.history.messages[0].split()[0].split('-') 991 creation_date = u'%s/%s/%s' % (datelist[2], datelist[1], datelist[0]) 992 return ( 993 'Your Kofa student record was created on %s. <br/><br/>' 994 'Please Note: This admission for ' 995 'Undergraduate Part-Time and Undergraduate Sandwich is incomplete ' 996 'until you have successfully applied on the <b>JAMB CAPS PORTAL</b>. ' 997 'Ignore this if you have completed your own <b>pre-admission</b> ' 998 'activities on the JAMB website.' % creation_date) 999 1000 def render(self): 1001 students_utils = getUtility(IStudentsUtils) 1002 letterhead_path = os.path.join( 1003 os.path.dirname(__file__), 'static', 'letterhead_admission.jpg') 1004 if not os.path.exists(letterhead_path): 1005 letterhead_path = None 1006 if self.context.current_mode in ('ug_pt', 'ug_sw'): 1007 return students_utils.renderPDFAdmissionLetter(self, 1008 self.context.student, omit_fields=self.omit_fields, 1009 letterhead_path=letterhead_path, post_text=self.post_text_pt) 1010 return students_utils.renderPDFAdmissionLetter(self, 1011 self.context.student, omit_fields=self.omit_fields, 1012 letterhead_path=letterhead_path, post_text=None)
Note: See TracChangeset for help on using the changeset viewer.