Changeset 18323
- Timestamp:
- 3 Sep 2026, 06:53:28 (3 months ago)
- Location:
- main/kofacustom.unidel/trunk/src/kofacustom/unidel/students
- Files:
-
- 3 edited
-
browser.py (modified) (1 diff)
-
reports/level_report.py (modified) (5 diffs)
-
reports/tests/test_level_report.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser.py
r18313 r18323 548 548 Name: ___________________________________ 549 549 550 Senior Deputy Registrar 551 (Examinations & Record) 552 For: Registrar 550 Head Examinations and Records 553 551 554 552 -
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), -
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/tests/test_level_report.py
r18317 r18323 30 30 def test_get_students(self): 31 31 self.student['studycourse']['100']['Course1'].ca = 0 32 self.student.sex = 'm' 32 33 lr = GradLevelReport('fac1', 'dep1', 'CERT1', 2010, 100) 33 34 # this is not a graduating student … … 41 42 result = lr._get_students('fac1', 'dep1', 'CERT1', 2010, 100) 42 43 self.assertEqual(result, 43 [(u'1234', u'TESTER, Bob', 91, 91, '5.00',44 [(u'1234', u'TESTER, Bob', 'm', 91, 91, '5.00', 44 45 'Nil', 'Nil', 91, 91, 77,'5.00', '1s_st_s')]) 45 46 return … … 48 49 self.student['studycourse']['100']['Course1'].ca = 0 49 50 self.student['studycourse']['100']['Course1'].credits = 146 51 self.student.sex = 'm' 50 52 self.certificate.end_level = 100 51 53 self.certificate.custom_float_1 = 145.6 … … 63 65 self.student['studycourse']['100']['Course1'].ca = 0 64 66 self.student['studycourse']['100']['Course1'].credits = 91 67 self.student.sex = 'm' 65 68 self.certificate.end_level = 100 66 69 self.certificate.custom_float_1 = 77 … … 79 82 self.student['studycourse']['100']['Course1'].ca = 0 80 83 self.student['studycourse']['100']['Course1'].credits = 91 84 self.student.sex = 'm' 81 85 self.certificate.end_level = 100 82 86 self.certificate.custom_float_1 = 77
Note: See TracChangeset for help on using the changeset viewer.
