Changeset 14368 for main/waeup.kofa/trunk/src
- Timestamp:
- 5 Jan 2017, 08:36:18 (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
r14356 r14368 69 69 level_obj.gpa_params[1], 70 70 passed_params[2], 71 passed_params[5], 71 72 level_obj.gpa, 72 73 failed_courses, … … 116 117 TTR(translate(_('Total Credits Taken'))), 117 118 TTR(translate(_('Total Credits Passed'))), 119 TTR(translate(_('Courses Without Result'))), 118 120 TTR(translate(_('GPA'))), 119 121 translate(_('Courses Failed')), … … 127 129 # Underline mandatory (core) courses 128 130 failed_courses = Paragraph( 129 line[ 5].replace('m_', '<u>').replace('_m', '</u>'), SMALL_PARA_STYLE)130 line = line[: 5] + (failed_courses,) + line[6:]131 line[6].replace('m_', '<u>').replace('_m', '</u>'), SMALL_PARA_STYLE) 132 line = line[:6] + (failed_courses,) + line[7:] 131 133 # Superscript in remarks (needed by AAUE) 132 134 remark = Paragraph( 133 line[ 9].replace('s_', '<super>').replace('_s', '</super>'), SMALL_PARA_STYLE)134 line = line[: 9] + (remark,)135 line[10].replace('s_', '<super>').replace('_s', '</super>'), SMALL_PARA_STYLE) 136 line = line[:10] + (remark,) 135 137 line = (sn,) + line 136 138 table.append(line) … … 186 188 table_data = tbl_data_to_table(self.data) 187 189 #col_widths = [3.5*cm] * len(self.data[0]) 188 col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 1*cm,190 col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 1*cm, 189 191 6*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm] 190 192 pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string, -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py
r14337 r14368 41 41 result = get_students('fac1', 'dep1', 2010, 100) 42 42 self.assertEqual(result, 43 [(u'1234', u'Bob Tester', 90, 30, 1.667, 'm_Course2_m Course3',43 [(u'1234', u'Bob Tester', 90, 30, 0, 1.667, 'm_Course2_m Course3', 44 44 90, 30, 1.667, '')]) 45 45 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r14361 r14368 160 160 def passed_params(self): 161 161 """Determine the number and credits of passed and failed courses. 162 Count the number of courses registered but not taken. 162 163 This method is used for level reports. 163 164 """ … … 166 167 credits_failed = 0 167 168 credits_passed = 0 169 no_courses_not_taken = 0 168 170 for ticket in self.values(): 169 171 if ticket.total_score is not None: … … 178 180 passed += 1 179 181 credits_passed += ticket.credits 180 return passed, failed, credits_passed, credits_failed, courses_failed 182 else: 183 no_courses_not_taken += 1 184 return (passed, failed, credits_passed, 185 credits_failed, courses_failed, 186 no_courses_not_taken) 181 187 182 188 @property -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r14293 r14368 894 894 self.assertEqual( 895 895 self.student['studycourse']['100'].passed_params, 896 (1, 1, 13, 10, 'COURSE1 ' ))896 (1, 1, 13, 10, 'COURSE1 ', 0)) 897 897 self.assertEqual( 898 898 self.student['studycourse']['200'].passed_params, 899 (0, 0, 0, 0, '' ))899 (0, 0, 0, 0, '', 1)) 900 900 # And also cumulative params can be calculated. Meanwhile we have the 901 901 # following courses: COURSE1 and COURSE2 in level 100 and
Note: See TracChangeset for help on using the changeset viewer.