Ignore:
Timestamp:
10 Oct 2019, 13:34:12 (5 years ago)
Author:
Henrik Bettermann
Message:

Customize Course Grading System

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/studylevel.py

    r15563 r15659  
    6464    grok.provides(ICustomCourseTicket)
    6565
     66    @property
     67    def _getGradeWeightFromScore(self):
     68        """IUOkada Course Grading System
     69        """
     70        if self.total_score is None:
     71            return (None, None)
     72        if self.total_score >= 70:
     73            return ('A',5)
     74        if self.total_score >= 60:
     75            return ('B',4)
     76        if self.total_score >= 50:
     77            return ('C',3)
     78        #if self.total_score >= 45:
     79        #    return ('D',2)
     80        if self.total_score >= self.passmark:
     81            return ('D',1)
     82        return ('F',0)
     83
    6684
    6785CustomCourseTicket = attrs_to_fields(CustomCourseTicket)
Note: See TracChangeset for help on using the changeset viewer.