Changeset 14138 for main/waeup.kofa/trunk/src
- Timestamp:
- 29 Aug 2016, 09:10:46 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py
r13969 r14138 52 52 ) 53 53 students_utils = getUtility(IStudentsUtils) 54 table = []54 table = list() 55 55 for i in range(len(students_utils.gpa_boundaries)+1): 56 56 # The last list is reserved for students with more than one … … 86 86 continue 87 87 # Session GPA can be determined 88 table[students_utils.getClassFromCGPA(level_obj.gpa)[0]].append(line) 88 gpaclass = students_utils.getClassFromCGPA(level_obj.gpa)[0] 89 table[gpaclass].append(line) 89 90 return table 90 91 … … 160 161 table_data = [('Student Id', 'Matric No.', 'Name')] + self.data[gpa_class] 161 162 pdf_data += [Table(table_data, style=TABLE_STYLE)] #, colWidths=col_widths)] 162 gpa_class += 1163 163 if self.data[-1]: 164 164 pdf_data.append(Spacer(1, 20)) … … 170 170 table_data = [('Student Id', 'Matric No.', 'Name')] + self.data[-1] 171 171 pdf_data += [Table(table_data, style=TABLE_STYLE)] 172 pdf_data.append(Spacer(1, 20)) 173 pdf_data += [Paragraph('<strong>Summary</strong>', STYLE["Normal"])] 174 pdf_data.append(Spacer(1, 10)) 175 for gpa_class in range(len(students_utils.gpa_boundaries)-1,-1,-1): 176 gpa_class_name = students_utils.gpa_boundaries[gpa_class][1] 177 gpa_count = len(self.data[gpa_class]) 178 pdf_data += [Paragraph('%s: %s' 179 % (gpa_class_name, gpa_count), STYLE["Normal"])] 180 pass 172 181 173 182 doc_title = translate(_('Presentation of Session Results'))
Note: See TracChangeset for help on using the changeset viewer.