Changeset 15246


Ignore:
Timestamp:
16 Nov 2018, 16:05:31 (6 years ago)
Author:
Henrik Bettermann
Message:

Make provisions for printing a note.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
3 edited

Legend:

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

    r15243 r15246  
    34413441    grok.require('waeup.editScores')
    34423442
     3443    @property
     3444    def note(self):
     3445        return
     3446
    34433447    def data(self, session):
    34443448        cat = queryUtility(ICatalog, name='coursetickets_catalog')
     
    34743478        students_utils = getUtility(IStudentsUtils)
    34753479        return students_utils.renderPDFCourseticketsOverview(
    3476             self, session, self.data(session), lecturers, 'landscape', 90)
     3480            self, session, self.data(session), lecturers, 'landscape', 90,
     3481            self.note)
    34773482
    34783483class ExportJobContainerOverview(KofaPage):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r15203 r15246  
    157157
    158158    def renderPDFCourseticketsOverview(
    159                   view, session, data, lecturers, orientation, title_length):
     159                  view, session, data, lecturers, orientation,
     160                  title_length, note):
    160161        """Render pdf slip of course tickets for a lecturer.
    161162        """
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r15241 r15246  
    10001000
    10011001    def renderPDFCourseticketsOverview(
    1002             self, view, session, data, lecturers, orientation, title_length):
     1002            self, view, session, data, lecturers, orientation,
     1003            title_length, note):
    10031004        """Render pdf slip of course tickets for a lecturer.
    10041005        """
     
    10341035                mapping = {'a':data[1][5],'b':data[1][6]})), style["Normal"]),]
    10351036        pdf_data.append(Spacer(1, 20))
    1036         colwidth = colWidths=[None] * len(data[0][0])
    1037         pdf_data += [Table(data[0], colwidth, style=CONTENT_STYLE)]
     1037        colWidths = [None] * len(data[0][0])
     1038        pdf_data += [Table(data[0], colWidths=colWidths, style=CONTENT_STYLE)]
    10381039        # Process title if too long
    10391040        title = " ".join(view.context.title.split())
     
    10571058            'Content-Disposition:', 'attachment; filename="%s' % filename)
    10581059        pdf_stream = creator.create_pdf(
    1059             pdf_data, None, doc_title, author, footer_title + ' -'
     1060            pdf_data, None, doc_title, author, footer_title + ' -', note
    10601061            )
    10611062        return pdf_stream
Note: See TracChangeset for help on using the changeset viewer.