Changeset 14361
- Timestamp:
- 22 Dec 2016, 19:58:41 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py
r14205 r14361 120 120 return 121 121 122 def _display_gpa(self, gpa): 123 return round(gpa, 2) 124 122 125 def getTranscriptData(self): 123 126 """Get a sorted list of dicts with level and course ticket data. … … 152 155 sgpa=sgpa)) 153 156 if total_credits_counted: 154 cgpa = round(cgpa/total_credits_counted, 2)157 cgpa = self._display_gpa(cgpa/total_credits_counted) 155 158 # Override cgpa if value has been imported 156 159 # (not implemented in base package) -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r14351 r14361 108 108 return session_string 109 109 110 def _display_gpa(self, gpa): 111 return round(gpa, 3) 112 110 113 @property 111 114 def gpa_params_rectified(self): … … 127 130 credits_weighted += ticket.credits * ticket.weight 128 131 if credits_counted: 129 level_gpa = round(credits_weighted/credits_counted, 3)132 level_gpa = self._display_gpa(credits_weighted/credits_counted) 130 133 return level_gpa, credits_counted, credits_weighted 131 134 … … 142 145 credits_weighted += ticket.credits * ticket.weight 143 146 if credits_counted: 144 level_gpa = round(credits_weighted/credits_counted, 3)147 level_gpa = self._display_gpa(credits_weighted/credits_counted) 145 148 # Override level_gpa if value has been imported 146 149 # (not implemented in base package) … … 201 204 total_credits_weighted += gpa_params[2] 202 205 if total_credits_counted: 203 cgpa = round(total_credits_weighted / total_credits_counted, 3)206 cgpa = self._display_gpa(total_credits_weighted/total_credits_counted) 204 207 # Override cgpa if value has been imported 205 208 # (not implemented in base package)
Note: See TracChangeset for help on using the changeset viewer.