Changeset 14350
- Timestamp:
- 16 Dec 2016, 11:45:22 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r14247 r14350 47 47 return co_ticket 48 48 49 def getGradeWeightFromScore(score): 50 if score is None: 49 def getGradeWeightFromScore(total, student): 50 """Nigerian Course Grading System 51 """ 52 if total is None: 51 53 return (None, None) 52 if score>= 70:54 if total >= 70: 53 55 return ('A',5) 54 if score>= 60:56 if total >= 60: 55 57 return ('B',4) 56 if score>= 50:58 if total >= 50: 57 59 return ('C',3) 58 if score>= 45:60 if total >= 45: 59 61 return ('D',2) 60 if score >= 40:62 if total >= 40 and student.entry_session < 2013: 61 63 return ('E',1) 62 64 return ('F',0) … … 377 379 """Returns the grade calculated from total score. 378 380 """ 379 return getGradeWeightFromScore(self.total_score )[0]381 return getGradeWeightFromScore(self.total_score, self.student)[0] 380 382 381 383 @property … … 383 385 """Returns the weight calculated from total score. 384 386 """ 385 return getGradeWeightFromScore(self.total_score )[1]387 return getGradeWeightFromScore(self.total_score, self.student)[1] 386 388 387 389 CourseTicket = attrs_to_fields(CourseTicket)
Note: See TracChangeset for help on using the changeset viewer.