Changeset 14988 for main


Ignore:
Timestamp:
23 Apr 2018, 13:28:21 (7 years ago)
Author:
Henrik Bettermann
Message:

DSPG course grading system is different.

File:
1 edited

Legend:

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

    r14716 r14988  
    5252
    5353class CustomCourseTicket(CourseTicket):
    54     """This is a course ticket which allows the
    55     student to attend the course. Lecturers will enter scores and more at
    56     the end of the term.
    57 
    58     A course ticket contains a copy of the original course and
    59     course referrer data. If the courses and/or their referrers are removed, the
    60     corresponding tickets remain unchanged. So we do not need any event
    61     triggered actions on course tickets.
     54    """
    6255    """
    6356    grok.implements(ICustomCourseTicket, IStudentNavigation)
    6457    grok.provides(ICustomCourseTicket)
     58
     59
     60    @property
     61    def _getGradeWeightFromScore(self):
     62        """DSPG Course Grading System
     63        """
     64        if self.total_score is None:
     65            return (None, None)
     66        if self.total_score >= 75:
     67            return ('A',4)
     68        if self.total_score >= 70:
     69            return ('AB',3.5)
     70        if self.total_score >= 65:
     71            return ('B',3.25)
     72        if self.total_score >= 60:
     73            return ('BC',3.0)
     74        if self.total_score >= 55:
     75            return ('C',2.75)
     76        if self.total_score >= 50:
     77            return ('CD',2.5)
     78        if self.total_score >= 45:
     79            return ('D',2.25)
     80        if self.total_score >= 40:
     81            return ('E',2)
     82        return ('F',0)
    6583
    6684
Note: See TracChangeset for help on using the changeset viewer.