Changeset 14462 for main/waeup.aaue/trunk
- Timestamp:
- 26 Jan 2017, 08:52:42 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r14459 r14462 42 42 (5, '1st Class Honours')) 43 43 44 def getClassFromCGPA(self, gpa, student): 45 if gpa < self.gpa_boundaries[0][0]: 46 # FRNS 47 return 0, self.gpa_boundaries[0][1] 48 if student.entry_session < 2013: 49 if gpa < self.gpa_boundaries[1][0]: 50 # Pass 51 return 1, self.gpa_boundaries[1][1] 52 else: 53 if gpa < self.gpa_boundaries[1][0]: 54 # FRNS (Pass degree has been phased out in 2013) 55 return 0, self.gpa_boundaries[0][1] 56 if gpa < self.gpa_boundaries[2][0]: 57 # 3rd 58 return 2, self.gpa_boundaries[2][1] 59 if gpa < self.gpa_boundaries[3][0]: 60 # 2nd L 61 return 3, self.gpa_boundaries[3][1] 62 if gpa < self.gpa_boundaries[4][0]: 63 # 2nd U 64 return 4, self.gpa_boundaries[4][1] 65 if gpa <= self.gpa_boundaries[5][0]: 66 # 1st 67 return 5, self.gpa_boundaries[5][1] 68 return 'N/A' 69 44 70 def getDegreeClassNumber(self, level_obj): 45 71 """Get degree class number (used for SessionResultsPresentation … … 62 88 return 0 63 89 # use gpa_boundaries above 64 return self.getClassFromCGPA(level_obj.cumulative_params[0])[0] 90 return self.getClassFromCGPA( 91 level_obj.cumulative_params[0], level_obj.student)[0] 65 92 66 93 def increaseMatricInteger(self, student):
Note: See TracChangeset for help on using the changeset viewer.