Ignore:
Timestamp:
24 Jan 2024, 07:22:31 (10 months ago)
Author:
Henrik Bettermann
Message:

Implement CDL admission slip.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r17584 r17679  
    428428from kofacustom.iuokada.students.admission_letter_pt import ADML_PT
    429429from kofacustom.iuokada.students.admission_letter_jupeb import ADML_JUPEB
     430from kofacustom.iuokada.students.admission_letter_cdl import ADML_CDL
    430431
    431432class CustomExportPDFAdmissionSlip(ExportPDFAdmissionSlip):
     
    469470            ' been admitted as follows:')
    470471
     472    @property
     473    def pre_text_cdl(self):
     474        return (
     475            'I am pleased to inform you that you have been offered provisional'
     476            ' admission into the Igbinedion University, '
     477            'Centre for Distance Learning as follows:')
     478
    471479    def render(self):
    472480        students_utils = getUtility(IStudentsUtils)
     
    474482            os.path.dirname(__file__), 'static', 'watermark.pdf')
    475483        watermark = open(watermark_path, 'rb')
     484        if grok.getSite().__name__ == 'iuokada-cdl':
     485            return students_utils.renderPDFAdmissionLetter(self,
     486                self.context.student, omit_fields=self.omit_fields,
     487                pre_text=self.pre_text_cdl, post_text=ADML_CDL,
     488                watermark=watermark)
    476489        if self.context.is_jupeb:
    477490            return students_utils.renderPDFAdmissionLetter(self,
Note: See TracChangeset for help on using the changeset viewer.