Changeset 15887 for main


Ignore:
Timestamp:
12 Dec 2019, 16:40:37 (5 years ago)
Author:
Henrik Bettermann
Message:

Use letterhead for non-ug admission slips.

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

Legend:

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

    r15717 r15887  
    1717##
    1818import grok
     19import os
    1920from zope.i18n import translate
    2021from zope.component import getUtility
     
    6263        return """You should note the following as conditions for admission:
    6364
    64 1. At the point of registration, you will be required to present the originals
    65    of your certificate(s), Jamb Original Result, a Birth Certificate or a Declaration
    66    of Age Certificate and Evidence of Citizenship Certificate.
    67 
    68 2. Please note that the name by which you are hereby admitted and by which you
    69    will be registered is the one which will appear on any certificate that the
    70    Federal College of Education, Okene may issue to you on successful completion
    71    of your programme except there was a change of name by sworn affidavit or
    72    marriage certificate in addition to newspaper publication.
    73 
    74 3. You are hereby informed that all fees must be paid at the beginning of
    75    the academic session. The current school fees can be obtained from the
    76    College website.
    77 
    78 4. You will present at the time of registration the Medical Certificate of
    79    Fitness from the Federal College of Education, Okene Medical Centre.
    80 
    81 5. Please, note that due to shortage of accommodations, students shall be
    82    given accommodations on first come, first serve basis.
     651. At the point of registration, you will be required to present the originals of your certificate(s),
     66   Jamb Original Result, a Birth Certificate or a Declaration of Age Certificate and Evidence of
     67   Citizenship Certificate.
     68
     692. Please note that the name by which you are hereby admitted and by which you will be registered
     70   is the one which will appear on any certificate that the Federal College of Education, Okene may
     71   issue to you on successful completion of your programme except there was a change of name by
     72   sworn affidavit or marriage certificate in addition to newspaper publication.
     73
     743. You are hereby informed that all fees must be paid at the beginning of the academic session.
     75   The current school fees can be obtained from the College website.
     76
     774. You will present at the time of registration the Medical Certificate of Fitness from the Federal
     78   College of Education, Okene Medical Centre.
     79
     805. Please, note that due to shortage of accommodations, students shall be given accommodations
     81   on first come, first serve basis.
    8382
    84836. The offer is not transferable to another session.
    8584
    86 7. You will sign a declaration of good conduct except by deferment on your
    87    arrival at the College.
     857. You will sign a declaration of good conduct except by deferment on your arrival at the College.
    8886
    8987Accept my congratulations.
     
    9694"""
    9795
    98 
    9996    def render(self):
    10097        students_utils = getUtility(IStudentsUtils)
     98        letterhead_path = os.path.join(
     99            os.path.dirname(__file__), 'static', 'letterhead_admission.jpg')
     100        if self.context.student.current_mode.startswith('ug'):
     101            letterhead_path = None
    101102        return students_utils.renderPDFAdmissionLetter(self,
    102103            self.context.student, omit_fields=self.omit_fields,
     104            letterhead_path=letterhead_path,
    103105            post_text=self._post_text)
    104106
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py

    r15827 r15887  
    394394        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    395395        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     396        path = os.path.join(samples_dir(), 'admission_slip_combined.pdf')
     397        open(path, 'wb').write(self.browser.contents)
     398        print "Sample PDF admission_slip_combined.pdf written to %s" % path
     399        self.certificate.study_mode = 'pd_ft'
     400        self.browser.open(self.student_path)
     401        self.browser.getLink("Download admission letter").click()
    396402        path = os.path.join(samples_dir(), 'admission_slip.pdf')
    397403        open(path, 'wb').write(self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.