Changeset 18323 for main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/level_report.py
- Timestamp:
- 3 Sep 2026, 06:53:28 (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/level_report.py
r18321 r18323 41 41 ILevelReport, LevelReportGeneratorPage, 42 42 LevelReportPDFView, 43 TABLE_STYLE,44 43 TTR) 45 44 46 45 STYLE = getSampleStyleSheet() 46 47 48 TABLE_STYLE = [ 49 ('FONT', (0,0), (-1,-1), 'Helvetica', 8), 50 ('VALIGN', (0, 1), (-1,-1), 'TOP'), 51 #('FONT', (0,0), (0,-1), 'Helvetica-Bold', 8), # 1st column 52 ('FONT', (0,0), (-1,0), 'Helvetica-Bold', 8), # 1st row 53 #('FONT', (0,-1), (-1,-1), 'Helvetica-Bold', 8), # last row 54 #('FONT', (-1,0), (-1,-1), 'Helvetica-Bold', 8), # last column 55 ('ALIGN', (3,1), (-1,-1), 'RIGHT'), 56 ('ALIGN', (0,0), (0,-1), 'RIGHT'), 57 ('ALIGN', (7,0), (7,-1), 'LEFT'), 58 ('ALIGN', (8,0), (8,-1), 'LEFT'), 59 ('INNERGRID', (0,1), (-1,-1), 0.25, colors.black), 60 ('BOX', (0,1), (-1,-1), 1, colors.black), 61 ] 47 62 48 63 def tbl_data_to_table(data): … … 52 67 'Matric No.', 53 68 'Student Name', 69 'Sex', 54 70 TTR('Total Credits Taken'), 55 71 TTR('Total Credits Passed'), … … 134 150 not_taken_courses = textwrap.fill(passed_params[5], 17) 135 151 fullname = textwrap.fill(stud.display_fullname, 29) 152 sex = stud.sex 136 153 remark = getattr(level_obj, 'remark', '') 137 154 cert = stud['studycourse'].certificate … … 165 182 stud.matric_number, 166 183 fullname, 184 sex, 167 185 credits_counted, 168 186 credits_passed, … … 179 197 return sorted(table, key=lambda value:value[0]) 180 198 199 note = """ 200 201 202 203 FRNS (Faculty Requirements Not Satisfied) 204 NER (No Evidence of Registration) 205 NEV (No Evidence of Verification) 206 """ 207 181 208 def create_pdf(self, job_id): 182 209 creator = getUtility(IPDFCreator, name=self.pdfcreator) 183 210 table_data = tbl_data_to_table(self.data) 184 211 #col_widths = [3.5*cm] * len(self.data[0]) 185 col_widths = [ 1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 1*cm,186 5.2*cm, 3*cm, 0.8*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm]212 col_widths = [0.8*cm, 3*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 1*cm, 213 4*cm, 4*cm, 0.8*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm] 187 214 pdf_data = [Paragraph('<b>%s - Report %s</b>' 188 215 % (self.creation_dt_string, job_id),
Note: See TracChangeset for help on using the changeset viewer.
