Ignore:
Timestamp:
21 Jun 2021, 08:53:09 (4 years ago)
Author:
Henrik Bettermann
Message:

Remove customization.

File:
1 edited

Legend:

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

    r14409 r16512  
    3030from kofacustom.coewarri.students.interfaces import (
    3131    ICustomStudentStudyLevel, ICustomCourseTicket)
    32 
    33 def getGradeWeightFromScore(score):
    34     if score is None:
    35         return (None, None)
    36     if score >= 70:
    37         return ('A',5)
    38     if score >= 60:
    39         return ('B',4)
    40     if score >= 50:
    41         return ('C',3)
    42     if score >= 45:
    43         return ('D',2)
    44     if score >= 40:
    45         return ('E',1)
    46     return ('F',0)
    47 
    4832
    4933class CustomStudentStudyLevel(StudentStudyLevel):
     
    7963    grok.provides(ICustomCourseTicket)
    8064
    81     @property
    82     def grade(self):
    83         """Returns the grade calculated from total score.
    84         """
    85         return getGradeWeightFromScore(self.total_score)[0]
    86 
    87     @property
    88     def weight(self):
    89         """Returns the weight calculated from total score.
    90         """
    91         return getGradeWeightFromScore(self.total_score)[1]
    92 
    9365CustomCourseTicket = attrs_to_fields(CustomCourseTicket)
    9466
Note: See TracChangeset for help on using the changeset viewer.