Ignore:
Timestamp:
18 Jan 2017, 10:25:37 (8 years ago)
Author:
Henrik Bettermann
Message:

Print '- NIL -' if no student is found in degree class.

File:
1 edited

Legend:

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

    r14410 r14416  
    161161            pdf_data += [Paragraph('<strong>%s</strong>' % gpa_class_name,
    162162                         STYLE["Normal"])]
    163             table_data = [('Student Id', 'Matric No.', 'Name')] + self.data[gpa_class]
     163            if len(self.data[gpa_class]):
     164                gpa_class_data = self.data[gpa_class]
     165            else:
     166                gpa_class_data = [('', '- NIL -', '')]
     167            table_data = [('Student Id', 'Matric No.', 'Name')] + gpa_class_data
    164168            pdf_data += [Table(table_data, style=TABLE_STYLE)]    #, colWidths=col_widths)]
    165169        if self.data[-1]:
Note: See TracChangeset for help on using the changeset viewer.