Changeset 14438 for main/waeup.kofa


Ignore:
Timestamp:
23 Jan 2017, 09:20:52 (8 years ago)
Author:
Henrik Bettermann
Message:

Ease selection of pdf creator in custom packages.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/browser_templates/levelreportgeneratorpage.pt

    r14432 r14438  
    11<form  i18n:domain="waeup.kofa"  method="POST">
    22  <p i18n:translate="">
    3     Please pick the department, session and level
     3    Please pick the certificate, session and level
    44    for which the report should be generated.
    55    The report will be processed and then made available for you
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py

    r14427 r14438  
    177177    certcode = None
    178178
     179    pdfcreator = 'landscape'
     180
    179181    note = None
    180182
     
    210212
    211213    def create_pdf(self, job_id):
    212         creator = getUtility(IPDFCreator, name='landscape')
     214        creator = getUtility(IPDFCreator, name=self.pdfcreator)
    213215        table_data = tbl_data_to_table(self.data)
    214216        #col_widths = [3.5*cm] * len(self.data[0])
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py

    r14426 r14438  
    121121    depcode = None
    122122    certcode = None
     123    pdfcreator = ''
    123124
    124125    note = None
     
    158159
    159160    def create_pdf(self, job_id):
    160         creator = getUtility(IPDFCreator)
     161        creator = getUtility(IPDFCreator, name=self.pdfcreator)
    161162        #col_widths = [2*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 6*cm, ]
    162163        pdf_data = [Paragraph('<b>%s - Report %s</b>'
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_payment_statistics.py

    r14373 r14438  
    181181    session = None
    182182    mode = None
     183    pdfcreator = 'landscape'
    183184
    184185    def __init__(self, session, mode, level, breakdown, author='System'):
     
    201202
    202203    def create_pdf(self, job_id):
    203         creator = getUtility(IPDFCreator, name='landscape')
     204        creator = getUtility(IPDFCreator, name=self.pdfcreator)
    204205        table_data = tbl_data_to_table(*self.data)
    205206        col_widths = [None,] + [3.2*cm] * len(self.data[1]) + [None,]
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_statistics.py

    r14373 r14438  
    142142    session = None
    143143    mode = None
     144    pdfcreator = 'landscape'
    144145
    145146    def __init__(self, session, mode, level, breakdown, author='System'):
     
    162163
    163164    def create_pdf(self, job_id):
    164         creator = getUtility(IPDFCreator, name='landscape')
     165        creator = getUtility(IPDFCreator, name=self.pdfcreator)
    165166        table_data = tbl_data_to_table(*self.data)
    166167        col_widths = [None,] + [1.6*cm] * len(self.data[1]) + [None,]
Note: See TracChangeset for help on using the changeset viewer.