Changeset 14406 for main/waeup.fceokene/trunk/src/waeup
- Timestamp:
- 16 Jan 2017, 10:52:15 (8 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/studylevel.py
r10482 r14406 31 31 ICustomStudentStudyLevel, ICustomCourseTicket) 32 32 33 def getGradeWeightFromScore(score): 34 if score is None: 35 return (None, None) 36 if score >= 70: 37 return ('A',5) 38 if score >= 60: 39 return ('B',4) 40 if score >= 50: 41 return ('C',3) 42 if score >= 45: 43 return ('D',2) 44 if score >= 40: 45 return ('E',1) 46 return ('F',0) 33 47 34 48 class CustomStudentStudyLevel(StudentStudyLevel): … … 68 82 return True 69 83 84 @property 85 def grade(self): 86 """Returns the grade calculated from total score. 87 """ 88 return getGradeWeightFromScore(self.total_score, self.student)[0] 89 90 @property 91 def weight(self): 92 """Returns the weight calculated from total score. 93 """ 94 return getGradeWeightFromScore(self.total_score, self.student)[1] 95 70 96 CustomCourseTicket = attrs_to_fields(CustomCourseTicket) 71 97 -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r14193 r14406 248 248 self.certificate.study_mode = 'ug_ft' 249 249 error, payment = utils.setPaymentDetails('schoolfee',self.student) 250 self.assertEqual(payment.amount_auth, 61300.0)250 self.assertEqual(payment.amount_auth, 56300.0) 251 251 self.assertEqual(error, None) 252 252 # UG cleared students pay 65650
Note: See TracChangeset for help on using the changeset viewer.