Ignore:
Timestamp:
11 Sep 2013, 09:57:00 (11 years ago)
Author:
Henrik Bettermann
Message:

Print classes in reverse order.

File:
1 edited

Legend:

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

    r10581 r10620  
    148148                    Spacer(1, 12),]
    149149        students_utils = getUtility(IStudentsUtils)
    150 
    151 
    152         gpa_class = 0
    153         for table in self.data[:-1]:
     150        # Print classes in reverse order
     151        for gpa_class in range(len(students_utils.gpa_boundaries)-1,-1,-1):
    154152            pdf_data.append(Spacer(1, 20))
    155153            gpa_class_name = students_utils.gpa_boundaries[gpa_class][1]
    156154            pdf_data += [Paragraph('<strong>%s</strong>' % gpa_class_name,
    157155                         STYLE["Normal"])]
    158             table_data = [('Student Id', 'Matric No.', 'Name')] + table
     156            table_data = [('Student Id', 'Matric No.', 'Name')]
     157                          + self.data[gpa_class]
    159158            pdf_data += [Table(table_data, style=TABLE_STYLE)]    #, colWidths=col_widths)]
    160159            gpa_class += 1
    161 
    162160        if self.data[-1]:
    163161            pdf_data.append(Spacer(1, 20))
Note: See TracChangeset for help on using the changeset viewer.