Changeset 14354


Ignore:
Timestamp:
16 Dec 2016, 17:36:07 (8 years ago)
Author:
Henrik Bettermann
Message:

getGradeWeightFromScore is now the same in the base package.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r14320 r14354  
    3333    IStudentsUtils, IStudent, IStudentRequestPW)
    3434from waeup.kofa.students.workflow import PAID, REGISTERED, RETURNING
     35from waeup.kofa.students.studylevel import getGradeWeightFromScore
    3536from waeup.kofa.students.browser import (
    3637    StartClearancePage,
     
    8081    ICustomCourseTicket,
    8182    ICustomStudentBase)
    82 from waeup.aaue.students.studylevel import getGradeWeightFromScore
    8383from waeup.aaue.interswitch.browser import gateway_net_amt
    8484from waeup.aaue.interfaces import MessageFactory as _
  • main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py

    r14348 r14354  
    3838
    3939
    40 def getGradeWeightFromScore(total, student):
    41     if total is None:
    42         return (None, None)
    43     if total >= 70:
    44         return ('A',5)
    45     if total >= 60:
    46         return ('B',4)
    47     if total >= 50:
    48         return ('C',3)
    49     if total >= 45:
    50         return ('D',2)
    51     if total >= 40 and student.entry_session < 2013:
    52         return ('E',1)
    53     return ('F',0)
    54 
    55 
    5640class CustomStudentStudyLevel(StudentStudyLevel):
    5741    """This is a container for course tickets.
     
    304288
    305289    @property
    306     def grade(self):
    307         """Returns the grade calculated from score.
    308         """
    309         return getGradeWeightFromScore(self.total_score, self.student)[0]
    310 
    311     @property
    312     def weight(self):
    313         """Returns the weight calculated from score.
    314         """
    315         return getGradeWeightFromScore(self.total_score, self.student)[1]
    316 
    317     @property
    318290    def total_score(self):
    319291        """Returns ca + score.
Note: See TracChangeset for help on using the changeset viewer.