Changeset 17842 for main/waeup.kofa


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

Add option for signatures to attendance sheet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r17564 r17842  
    11371137    def renderPDFCourseticketsOverview(
    11381138            self, view, name, session, data, lecturers, orientation,
    1139             title_length, note):
     1139            title_length, note,
     1140            signatures=(),
     1141            sigs_in_footer=(),):
    11401142        """Render pdf slip of course tickets for a lecturer.
    11411143        """
     
    12061208        author = '%s (%s)' % (view.request.principal.title,
    12071209                              view.request.principal.id)
     1210
     1211        # Insert signatures
     1212        # XXX: Not used in waeup.kofa, so we
     1213        # do not have a test for the following lines.
     1214        if signatures and not sigs_in_footer:
     1215            pdf_data.append(Spacer(1, 20))
     1216            # Render one signature table per signature to
     1217            # get date and signature in line.
     1218            for signature in signatures:
     1219                signaturetables = get_signature_tables(signature)
     1220                pdf_data.append(signaturetables[0])
     1221
    12081222        view.response.setHeader(
    12091223            'Content-Type', 'application/pdf')
     
    12111225            'Content-Disposition:', 'attachment; filename="%s' % filename)
    12121226        pdf_stream = creator.create_pdf(
    1213             pdf_data, None, doc_title, author, footer_title + ' -', note
     1227            pdf_data, None, doc_title, author, footer_title + ' -', note,
     1228            sigs_in_footer=sigs_in_footer,
    12141229            )
    12151230        return pdf_stream
Note: See TracChangeset for help on using the changeset viewer.