Ignore:
Timestamp:
11 Apr 2022, 16:39:46 (3 years ago)
Author:
Henrik Bettermann
Message:

Customize _getGradeWeightFromScore

File:
1 edited

Legend:

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

    r16639 r16917  
    6464    grok.provides(ICustomCourseTicket)
    6565
     66    @property
     67    def _getGradeWeightFromScore(self):
     68        """ECNS Course Grading System
     69        """
     70        if self.total_score is None:
     71            return (None, None)
     72        if self.total_score >= 80:
     73            return ('A',4)
     74        if self.total_score >= 70:
     75            return ('B+',3.5)
     76        if self.total_score >= 60:
     77            return ('B',3)
     78        if self.total_score >= 50:
     79            return ('C',2.5)
     80        return ('F',1)
     81
    6682
    6783CustomCourseTicket = attrs_to_fields(CustomCourseTicket)
Note: See TracChangeset for help on using the changeset viewer.