Changeset 14354 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 16 Dec 2016, 17:36:07 (8 years ago)
- 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 33 33 IStudentsUtils, IStudent, IStudentRequestPW) 34 34 from waeup.kofa.students.workflow import PAID, REGISTERED, RETURNING 35 from waeup.kofa.students.studylevel import getGradeWeightFromScore 35 36 from waeup.kofa.students.browser import ( 36 37 StartClearancePage, … … 80 81 ICustomCourseTicket, 81 82 ICustomStudentBase) 82 from waeup.aaue.students.studylevel import getGradeWeightFromScore83 83 from waeup.aaue.interswitch.browser import gateway_net_amt 84 84 from waeup.aaue.interfaces import MessageFactory as _ -
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r14348 r14354 38 38 39 39 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 56 40 class CustomStudentStudyLevel(StudentStudyLevel): 57 41 """This is a container for course tickets. … … 304 288 305 289 @property 306 def grade(self):307 """Returns the grade calculated from score.308 """309 return getGradeWeightFromScore(self.total_score, self.student)[0]310 311 @property312 def weight(self):313 """Returns the weight calculated from score.314 """315 return getGradeWeightFromScore(self.total_score, self.student)[1]316 317 @property318 290 def total_score(self): 319 291 """Returns ca + score.
Note: See TracChangeset for help on using the changeset viewer.