Ignore:
Timestamp:
13 Jul 2024, 06:40:06 (4 months ago)
Author:
Henrik Bettermann
Message:

Add note to attendance sheet.

File:
1 edited

Legend:

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

    r17832 r17843  
    3535    StudentTriggerTransitionFormPage,
    3636    ExportPDFAdmissionSlip,
     37    ExportAttendanceSlip,
    3738    PaymentsManageFormPage, msave, emit_lock_message)
    3839from waeup.kofa.students.interfaces import IStudentsUtils, ICourseTicket, IStudentBase
     
    302303            note=self.note)
    303304
    304 class CustomExportPDFAdmissionSlip(ExportPDFAdmissionSlip):
    305     grok.require('waeup.managePortal')
    306 
     305
     306class CustomExportAttendanceSlip(ExportAttendanceSlip):
     307    """
     308    """
     309
     310    #def _signatures(self):
     311    #    return ([_('Student Signature')],
     312    #            [_('Clearance Officer Signature')])
     313
     314    @property
     315    def note(self):
     316        return """
     317
     318       
     319Faculty: __________________________________________________________
     320
     321Department: ______________________________________________________
     322
     323Date of Examination: _______________________________________________
     324
     325Time of Examination: _______________________________________________
     326
     327Venue of Examination: ______________________________________________
     328
     329Names of Supervisors:
     330
     331______________________________________________
     332
     333______________________________________________
     334
     335______________________________________________
     336
     337______________________________________________
     338
     339______________________________________________
     340        """
     341
     342    def render(self):
     343        lecturers = [i['user_title'] for i in self.getUsersWithLocalRoles()
     344                     if i['local_role'] == 'waeup.local.Lecturer']
     345        lecturers =  ', '.join(lecturers)
     346        students_utils = getUtility(IStudentsUtils)
     347        return students_utils.renderPDFCourseticketsOverview(
     348            self, 'attendance', self.current_academic_session,
     349            self.data(self.current_academic_session),
     350            lecturers, '', 65, self.note)
Note: See TracChangeset for help on using the changeset viewer.