Ignore:
Timestamp:
11 Aug 2024, 19:29:13 (6 weeks ago)
Author:
Henrik Bettermann
Message:

Provide affidavit of good conduct form.

File:
1 edited

Legend:

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

    r17880 r17885  
    11671167    grok.require('waeup.uploadStudentFile')
    11681168    grok.template('affidavituploadpage')
    1169     label = _('Upload affidavit of good behavior')
     1169    label = _('Upload affidavit of good conduct')
    11701170    deletion_warning = _('Are you sure?')
    11711171    pnav = 4
     1172
     1173class ExportPDFAffidavitSlip(UtilityView, grok.View):
     1174    """Deliver a affidavit PDF template.
     1175    """
     1176    grok.context(ICustomStudent)
     1177    grok.name('affidavit_good_conduct.pdf')
     1178    grok.require('waeup.viewStudent')
     1179    prefix = 'form'
     1180
     1181    omit_fields = ('date_of_birth', 'current_level', 'certificate',
     1182        'current_mode', 'entry_session')
     1183
     1184    form_fields = grok.AutoFields(ICustomStudentBase).select('student_id', 'matric_number')
     1185
     1186    pre_text = ' '
     1187
     1188    post_text = '''
     1189To undertake as follows:
     1190
     1191(i) to abide by the arrangement(s) put in place by the University Management for the
     1192supply, distribution and utilization of electricity on the campuses of the
     1193University of Benin;
     1194
     1195(ii) to pay outstanding school charges upon resumption as eligibility for examinations
     1196will henceforth be strictly based on presentation of evidence of payment of approved
     1197school charges;
     1198
     1199(iii) not to bring any prohibited appliances, such as hot plate, ring boiler,
     1200gas cooker etc into the Halls of Residence, as violation of this rule shall attract
     1201rustication of such a Student;
     1202
     1203(iv) not to be involved in any unruly conduct that is against the Rules and
     1204Regulations of the University; and
     1205
     1206(v) to be of good conduct, and not to sponsor or participate in any unauthorized
     1207assembly or demonstration within the campuses and their precincts.
     1208
     1209
     1210
     1211
     1212
     1213________________________________
     1214Student Signature
     1215
     1216'''
     1217
     1218    @property
     1219    def label(self):
     1220        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
     1221        return 'Affidavit of Undertaking to be of Good Conduct'
     1222           
     1223    def render(self):
     1224        students_utils = getUtility(IStudentsUtils)
     1225        letterhead_path = os.path.join(
     1226            os.path.dirname(__file__), 'static', 'letterhead.jpg')
     1227        if not os.path.exists(letterhead_path):
     1228            letterhead_path = None
     1229        return students_utils.renderPDFAdmissionLetter(self,
     1230            self.context.student, omit_fields=self.omit_fields,
     1231            letterhead_path=letterhead_path,
     1232            pre_text=self.pre_text, post_text=self.post_text)
Note: See TracChangeset for help on using the changeset viewer.