Changeset 10615 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 11 Sep 2013, 05:47:55 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py
r10579 r10615 56 56 continue 57 57 passed_params = level_obj.passed_params 58 line = (stud.student_id, 58 line = ( 59 #stud.student_id, 59 60 stud.matric_number, 60 61 stud.display_fullname, … … 65 66 ) 66 67 table.append(line) 67 return table68 return sorted(table, key=lambda value:value[1]) 68 69 69 70 from reportlab.lib import colors … … 97 98 def tbl_data_to_table(data): 98 99 result = [] 99 col_names = ('Student Id', 'Matric No.', 'Name', 100 TTR('Total Credits'), TTR('Total Credits Passed'), 101 TTR('GPA'), 'Courses Failed') 100 col_names = ( 101 #'Student Id', 102 'S/N', 103 'Matric No.', 104 'Name', 105 TTR('Total Credits'), 106 TTR('Total Credits Passed'), 107 TTR('GPA'), 108 'Courses Failed') 102 109 table = [col_names] 110 sn = 1 103 111 for line in data: 112 line = (sn,) + line 104 113 table.append(line) 114 sn += 1 105 115 return table 106 116 … … 112 122 #('FONT', (-1,0), (-1,-1), 'Helvetica-Bold', 8), # last column 113 123 ('ALIGN', (3,1), (-1,-1), 'RIGHT'), 114 #('ALIGN', (1,0), (1,-1), 'LEFT'), 115 #('ALIGN', (2,0), (2,-1), 'LEFT'), 124 ('ALIGN', (0,0), (0,-1), 'RIGHT'), 116 125 ('ALIGN', (6,0), (6,-1), 'LEFT'), 117 126 ('INNERGRID', (0,1), (-1,-1), 0.25, colors.black), … … 148 157 table_data = tbl_data_to_table(self.data) 149 158 #col_widths = [3.5*cm] * len(self.data[0]) 150 col_widths = [ 2*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 6*cm, ]159 col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 6*cm, ] 151 160 pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string, 152 161 STYLE["Normal"]),
Note: See TracChangeset for help on using the changeset viewer.