- Timestamp:
- 10 Jan 2017, 18:41:09 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/raw_score_report.py
r14381 r14384 230 230 pdf_data += [Paragraph( 231 231 translate( 232 '${a}<br />${b}<br /> Level: ${c}<br />Session: ${d}',232 '${a}<br />${b}<br />Session: ${c}<br />Level: ${d}', 233 233 mapping = {'a':self.factitle, 234 234 'b':self.deptitle, 235 'c':self.level, 236 'd':self.session, }), 235 'c':self.session, 236 'd':self.level, 237 }), 237 238 STYLE["Normal"]), 238 239 Spacer(1, 12),] -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_level_report.py
r14374 r14384 30 30 result = get_students('fac1', 'dep1', 2010, 100) 31 31 self.assertEqual(result, 32 [(u'1234', u'TESTER, Bob', 30, 30, 0, 5.0, '', 30, 30, 5.0, 'Proceed')])32 [(u'1234', u'TESTER, Bob', 30, 30, 0, '5.00', '', 30, 30, '5.000', 'Proceed')]) 33 33 return 34 34 -
main/waeup.aaue/trunk/src/waeup/aaue/students/studycourse.py
r14362 r14384 48 48 return self.is_postgrad 49 49 50 def _display_gpa(self, gpa):51 return int(100 * gpa) / 100.052 53 50 CustomStudentStudyCourse = attrs_to_fields(CustomStudentStudyCourse) 54 51 -
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r14380 r14384 60 60 return total 61 61 62 def _display_gpa(self, gpa):63 return int(100 * gpa) / 100.064 65 62 @property 66 63 def gpa_params(self): … … 75 72 credits_weighted += ticket.credits * ticket.weight 76 73 if credits_counted: 77 level_gpa = self._display_gpa(credits_weighted/credits_counted)74 level_gpa = credits_weighted/credits_counted 78 75 # Override level_gpa if value has been imported 79 76 imported_gpa = getattr(self, 'imported_gpa', None) … … 110 107 else: 111 108 no_courses_not_taken += 1 109 if not len(courses_failed): 110 ccourses_failed = 'nil' 112 111 return (passed, failed, credits_passed, 113 112 credits_failed, courses_failed, … … 181 180 if end_level and self.level >= end_level: 182 181 failed_courses = self.passed_params[4] 183 if '_m' in failed_courses :182 if '_m' in failed_courses or not self.cumulative_params[0]: 184 183 return 'FRNS' 185 184 if self.cumulative_params[0] < failed_limit: -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14375 r14384 116 116 # sgpa = 82 / 23 117 117 self.assertEqual( 118 self.student['studycourse']['100'].gpa_params[0], 3.56 )118 self.student['studycourse']['100'].gpa_params[0], 3.5652173913043477) 119 119 # imported gpa values override calculated values 120 120 studylevel.imported_gpa = 4.3 … … 453 453 self.assertEqual(td[0][1]['level'].level_session, 2006) 454 454 self.assertEqual(td[0][1]['tickets_1'][0].code, 'ANYCODE') 455 self.assertEqual(td[1], 3.56 )455 self.assertEqual(td[1], 3.5652173913043477) 456 456 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 457 457 self.browser.open(self.student_path + '/studycourse/transcript')
Note: See TracChangeset for help on using the changeset viewer.