Changeset 14531
- Timestamp:
- 10 Feb 2017, 13:53:40 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r14530 r14531 47 47 return co_ticket 48 48 49 def getGradeWeightFromScore(score, ticket):50 """Nigerian Course Grading System51 """52 if score == -1:53 return ('-',0) # core course but result not yet available (used by AAUE)54 if score is None:55 return (None, None)56 if score >= 70:57 return ('A',5)58 if score >= 60:59 return ('B',4)60 if score >= 50:61 return ('C',3)62 if score >= 45:63 return ('D',2)64 if score >= ticket.passmark: # passmark changed in 2013 from 40 to 4565 return ('E',1)66 return ('F',0)67 68 49 class StudentStudyLevel(grok.Container): 69 50 """This is a container for course tickets. … … 384 365 385 366 @property 367 def _getGradeWeightFromScore(self): 368 """Nigerian Course Grading System 369 """ 370 if self.total_score is None: 371 return (None, None) 372 if self.total_score >= 70: 373 return ('A',5) 374 if self.total_score >= 60: 375 return ('B',4) 376 if self.total_score >= 50: 377 return ('C',3) 378 if self.total_score >= 45: 379 return ('D',2) 380 if self.total_score >= self.passmark: # passmark changed in 2013 from 40 to 45 381 return ('E',1) 382 return ('F',0) 383 384 @property 386 385 def grade(self): 387 386 """Returns the grade calculated from total score. 388 387 """ 389 return getGradeWeightFromScore(self.total_score, self)[0]388 return self._getGradeWeightFromScore[0] 390 389 391 390 @property … … 393 392 """Returns the weight calculated from total score. 394 393 """ 395 return getGradeWeightFromScore(self.total_score, self)[1]394 return self._getGradeWeightFromScore[1] 396 395 397 396 CourseTicket = attrs_to_fields(CourseTicket)
Note: See TracChangeset for help on using the changeset viewer.