Changeset 14392 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 13 Jan 2017, 11:34:53 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py
r14390 r14392 60 60 passed_params = level_obj.passed_params 61 61 failed_courses = textwrap.fill(passed_params[4], 35) 62 not_taken_courses = textwrap.fill(passed_params[5], 17) 62 63 fullname = textwrap.fill(stud.display_fullname, 29) 63 64 # This is a very special column requested by AAUE, Nigeria. … … 77 78 '%.3f' % (int(1000*level_obj.gpa)/1000.0), 78 79 failed_courses, 79 passed_params[5],80 not_taken_courses, 80 81 level_obj.cumulative_params[1], 81 82 level_obj.cumulative_params[4], … … 125 126 TTR(translate(_('GPA'))), 126 127 translate(_('Courses Failed')), 127 TTR(translate(_('Courses w/o Result'))),128 translate(_('Courses w/o Result')), 128 129 TTR(translate(_('Cum. Credits Taken'))), 129 130 TTR(translate(_('Cum. Credits Passed'))), … … 156 157 ('ALIGN', (0,0), (0,-1), 'RIGHT'), 157 158 ('ALIGN', (6,0), (6,-1), 'LEFT'), 159 ('ALIGN', (7,0), (7,-1), 'LEFT'), 158 160 ('INNERGRID', (0,1), (-1,-1), 0.25, colors.black), 159 161 ('BOX', (0,1), (-1,-1), 1, colors.black), … … 195 197 #col_widths = [3.5*cm] * len(self.data[0]) 196 198 col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 1*cm, 197 6*cm, 0.8*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm]199 6*cm, 3*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm] 198 200 pdf_data = [Paragraph('<b>%s - Report %s</b>' 199 201 % (self.creation_dt_string, job_id), -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py
r14390 r14392 42 42 self.assertEqual(result, 43 43 [(u'1234', u'Bob Tester', 90, 30, '1.666', 44 'm_Course2_m Course3', 0, 90, 30, '1.666', '')])44 'm_Course2_m Course3', '', 90, 30, '1.666', '')]) 45 45 return 46 46 … … 59 59 ticket.credits = 30 60 60 ticket.score = 30 61 ticket.mandatory = False62 ticket.passmark = 4063 61 self.student['studycourse']['100']['Course3'] = ticket 62 ticket2 = createObject('waeup.CourseTicket') 63 ticket2.code = 'Course4' 64 ticket2.credits = 30 65 self.student['studycourse']['100']['Course4'] = ticket2 66 ticket3 = createObject('waeup.CourseTicket') 67 ticket3.code = 'Course5' 68 ticket3.credits = 30 69 self.student['studycourse']['100']['Course5'] = ticket3 70 ticket4 = createObject('waeup.CourseTicket') 71 ticket4.code = 'Course5' 72 ticket4.credits = 30 73 self.student['studycourse']['100']['Course6'] = ticket4 64 74 report = LevelReport('fac1', 'dep1', 2010, 100) 65 75 result = report.create_pdf('JOB_ID') -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r14382 r14392 164 164 credits_failed = 0 165 165 credits_passed = 0 166 no_courses_not_taken = 0166 courses_not_taken = '' 167 167 for ticket in self.values(): 168 168 if ticket.total_score is not None: … … 178 178 credits_passed += ticket.credits 179 179 else: 180 no_courses_not_taken += 1180 courses_not_taken += '%s ' % ticket.code 181 181 return (passed, failed, credits_passed, 182 182 credits_failed, courses_failed, 183 no_courses_not_taken)183 courses_not_taken) 184 184 185 185 @property -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r14382 r14392 895 895 self.assertEqual( 896 896 self.student['studycourse']['100'].passed_params, 897 (1, 1, 13, 10, 'COURSE1 ', 0))897 (1, 1, 13, 10, 'COURSE1 ', '')) 898 898 self.assertEqual( 899 899 self.student['studycourse']['200'].passed_params, 900 (0, 0, 0, 0, '', 1))900 (0, 0, 0, 0, '', 'COURSE1 ')) 901 901 # And also cumulative params can be calculated. Meanwhile we have the 902 902 # following courses: COURSE1 and COURSE2 in level 100 and
Note: See TracChangeset for help on using the changeset viewer.