Changeset 10922 for main


Ignore:
Timestamp:
15 Jan 2014, 07:49:22 (11 years ago)
Author:
Henrik Bettermann
Message:

Customize admission letter (admission slip).

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r10689 r10922  
    2727    StudyLevelDisplayFormPage,
    2828    ExportPDFTranscriptPage,
     29    ExportPDFAdmissionSlipPage,
    2930    )
    3031from kofacustom.nigeria.students.browser import (
     
    176177            'A.O Esekigbe <br /> Deputy Registrar  <br /> '
    177178            'Exams, Records And Data <br /> For: Registrar')],)
     179
     180class CustomExportPDFAdmissionSlipPage(ExportPDFAdmissionSlipPage):
     181    """Deliver a PDF Admission slip.
     182    """
     183
     184    @property
     185    def label(self):
     186        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
     187        return translate(_('e-Admission Slip \n'),
     188            'waeup.kofa', target_language=portal_language) \
     189            + ' %s' % self.context.display_fullname
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r10656 r10922  
    1919from time import time
    2020from zope.component import createObject
    21 from waeup.kofa.interfaces import CLEARED, RETURNING, PAID
     21from waeup.kofa.interfaces import (
     22    CLEARED, RETURNING, PAID, academic_sessions_vocab)
    2223from kofacustom.nigeria.students.utils import NigeriaStudentsUtils
    2324from waeup.kofa.accesscodes import create_accesscode
     25from waeup.kofa.students.utils import trans
    2426from waeup.aaue.interfaces import MessageFactory as _
    2527
     
    127129                return _('Study course data are incomplete.'), None
    128130            if student.state == CLEARED:
     131                if student.faccode == 'FP':
     132                    amount = 84000.0  # plus acceptance fee?
    129133                amount = academic_session.school_fee
    130134            elif student.state == RETURNING or\
     
    173177        return None, payment
    174178
     179    def _admissionText(self, student, portal_language):
     180        inst_name = grok.getSite()['configuration'].name
     181        entry_session = student['studycourse'].entry_session
     182        entry_session = academic_sessions_vocab.getTerm(entry_session).title
     183        text = trans(_(
     184            'This is to inform you that you have been provisionally'
     185            ' admitted into ${a} for the ${b} academic session as follows:',
     186            mapping = {'a': inst_name, 'b': entry_session}),
     187            portal_language)
     188        return text
     189
    175190    def maxCredits(self, studylevel):
    176191        """Return maximum credits.
Note: See TracChangeset for help on using the changeset viewer.