Ignore:
Timestamp:
6 Jan 2017, 22:42:07 (8 years ago)
Author:
Henrik Bettermann
Message:

Show report number (job_id) on report pdf slips.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/raw_score_report.py

    r14272 r14374  
    216216                faccode, depcode, session, self.levelcode, course_codes)
    217217
    218     def create_pdf(self):
     218    def create_pdf(self, job_id):
    219219        creator = getUtility(IPDFCreator, name='A3landscape')
    220220        table_data = dict()
     
    223223                self.data[level], self.course_codes[level])
    224224        col_widths = [1*cm, 4*cm, 5*cm] + [1*cm] * len(self.course_codes)
    225         pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string,
     225        pdf_data = [Paragraph('<b>%s - Report %s</b>'
     226                              % (self.creation_dt_string, job_id),
    226227                              STYLE["Normal"]),
    227228                    Spacer(1, 12),]
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/student_level_statistics.py

    r13970 r14374  
    174174        self.data = get_student_stats(session, mode, breakdown)
    175175
    176     def create_pdf(self):
     176    def create_pdf(self, job_id):
    177177        creator = getUtility(IPDFCreator, name='landscape')
    178178        table_data = tbl_data_to_table(*self.data)
    179179        col_widths = [None,] + [1.8*cm] * (len(self.data[1]) - 1)+ [2.0*cm] + [None,]
    180         pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string,
     180        pdf_data = [Paragraph('<b>%s - Report %s</b>'
     181                              % (self.creation_dt_string, job_id),
    181182                              STYLE["Normal"]),
    182183                    Spacer(1, 12),]
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_level_report.py

    r14370 r14374  
    3636        self.student['studycourse']['100']['Course1'].ca = 0
    3737        report = CustomLevelReport('fac1', 'dep1', 2010, 100)
    38         result = report.create_pdf()
     38        result = report.create_pdf('JOB_ID')
    3939        self.assertTrue(result.startswith('%PDF-'))
    4040        path = os.path.join(samples_dir(), 'level_report.pdf')
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py

    r14132 r14374  
    6767        self.student['studycourse']['200']['Course2'] = ticket
    6868        report = RawScoreReport('fac1', 'dep1', 2011, 200)
    69         result = report.create_pdf()
     69        result = report.create_pdf('JOB_ID')
    7070        self.assertTrue(result.startswith('%PDF-'))
    7171        path = os.path.join(samples_dir(), 'raw_score_report.pdf')
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_student_level_statistics.py

    r13963 r14374  
    102102        self.student['studycourse'].current_level = 220
    103103        report = StudentLevelStatisticsReport(2010, 'Undergraduate Full-Time', 'depcode')
    104         result = report.create_pdf()
     104        result = report.create_pdf('JOB_ID')
    105105        self.assertTrue(result.startswith('%PDF-'))
    106106        path = os.path.join(samples_dir(), 'student_level_statistics.pdf')
Note: See TracChangeset for help on using the changeset viewer.