Changeset 10616 for main/waeup.kofa/trunk/src
- Timestamp:
- 11 Sep 2013, 06:03:04 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py
r10615 r10616 64 64 level_obj.gpa, 65 65 passed_params[4], 66 level_obj.cumulative_params[3], 67 level_obj.cumulative_params[4], 68 level_obj.cumulative_params[0], 66 69 ) 67 70 table.append(line) … … 106 109 TTR('Total Credits Passed'), 107 110 TTR('GPA'), 108 'Courses Failed') 111 'Courses Failed', 112 TTR('Cum. Credits Taken'), 113 TTR('Cum. Credits Passed'), 114 TTR('CGPA')) 109 115 table = [col_names] 110 116 sn = 1 … … 157 163 table_data = tbl_data_to_table(self.data) 158 164 #col_widths = [3.5*cm] * len(self.data[0]) 159 col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 6*cm, ] 165 col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 166 6*cm, 0.8*cm, 0.8*cm, 0.8*cm] 160 167 pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string, 161 168 STYLE["Normal"]), -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py
r10574 r10616 27 27 result = get_students('fac1', 'dep1', 2010, 100) 28 28 self.assertEqual(result, 29 [(u' K1000000', u'1234', u'Bob Tester', 30, 30, 5.0, [])])29 [(u'1234', u'Bob Tester', 30, 30, 5.0, [], 30, 30, 5.0)]) 30 30 return 31 31 -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r10598 r10616 149 149 """ 150 150 passed = failed = 0 151 failed_courses= []152 failed_credits= 0153 passed_credits= 0151 courses_failed = [] 152 credits_failed = 0 153 credits_passed = 0 154 154 for ticket in self.values(): 155 155 if ticket.score is not None: 156 156 if ticket.score < ticket.passmark: 157 157 failed += 1 158 failed_credits+= ticket.credits159 failed_courses.append(ticket.code)158 credits_failed += ticket.credits 159 courses_failed.append(ticket.code) 160 160 else: 161 161 passed += 1 162 passed_credits+= ticket.credits163 return passed, failed, passed_credits, failed_credits, failed_courses162 credits_passed += ticket.credits 163 return passed, failed, credits_passed, credits_failed, courses_failed 164 164 165 165 @property … … 171 171 (including repeating levels). This method is used for level reports. 172 172 """ 173 passed_credits= 0173 credits_passed = 0 174 174 total_credits = 0 175 175 total_credits_counted = 0 … … 179 179 if level.level > self.level: 180 180 continue 181 passed_credits+= level.passed_params[2]181 credits_passed += level.passed_params[2] 182 182 total_credits += level.total_credits 183 183 gpa_params = level.gpa_params … … 187 187 cgpa = round(total_credits_weighted / total_credits_counted, 3) 188 188 return (cgpa, total_credits_counted, total_credits_weighted, 189 total_credits, passed_credits)189 total_credits, credits_passed) 190 190 191 191 @property
Note: See TracChangeset for help on using the changeset viewer.