Changeset 18158 for main/waeup.aaue/trunk/src/waeup/aaue/students
- Timestamp:
- 24 Aug 2025, 15:09:48 (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r17700 r18158 22 22 import grok 23 23 import pytz 24 import pytz 25 import decimal 24 26 from datetime import datetime 25 27 from zope.component.interfaces import IFactory 26 from zope.component import createObject 28 from zope.component import createObject, getUtility 27 29 from zope.interface import implementedBy 28 30 from waeup.kofa.utils.helpers import attrs_to_fields 29 from waeup.kofa.interfaces import RETURNING, VALIDATED, REGISTERED, PAID 31 from waeup.kofa.interfaces import ( 32 RETURNING, VALIDATED, REGISTERED, PAID, IKofaUtils) 30 33 from waeup.kofa.students.browser import TicketError 31 34 from waeup.kofa.students.studylevel import ( … … 196 199 end_level = getattr(certificate, 'end_level', None) 197 200 study_mode = getattr(certificate, 'study_mode', None) 201 value = decimal.Decimal(str(self.cumulative_params[0])) 202 cgpa = round(value,2) 203 #cgpa = self.cumulative_params[0] 198 204 is_dp = False 199 205 if study_mode and study_mode.startswith('dp'): … … 223 229 if self.cumulative_params[1] < 60: 224 230 return 'FRNS' 225 if self.cumulative_params[0]< failed_limit:231 if cgpa < failed_limit: 226 232 return 'Fail' 227 233 dummy, repeat = divmod(self.level, 100) 228 if self.cumulative_params[0]< 5.1 and repeat == 20:234 if cgpa < 5.1 and repeat == 20: 229 235 # Irrespective of the CGPA of a student, if the He/She has 230 236 # 3rd Extension, such student will be graduated with a "Pass". 231 237 return 'Pass' 232 if self.cumulative_params[0]< 1.5:238 if cgpa < 1.5: 233 239 if is_dp: 234 240 return 'Fail' 235 241 return 'Pass' 236 if self.cumulative_params[0]< 2.4:242 if cgpa < 2.4: 237 243 if is_dp: 238 244 return 'Pass' 239 245 return '3s_rd_s' 240 if self.cumulative_params[0]< 3.5:246 if cgpa < 3.5: 241 247 if is_dp: 242 248 return 'Merit' 243 249 return '2s_2_s' 244 if self.cumulative_params[0]< 4.5:250 if cgpa < 4.5: 245 251 if is_dp: 246 252 return 'Credit' 247 253 return '2s_1_s' 248 if self.cumulative_params[0]< 5.1:254 if cgpa < 5.1: 249 255 if is_dp: 250 256 return 'Distinction' … … 262 268 # credits taken below limit 263 269 return 'Probation' 264 if self.cumulative_params[0]< failed_limit:270 if cgpa < failed_limit: 265 271 return 'Probation' 266 if self.cumulative_params[0]< 5.1:272 if cgpa < 5.1: 267 273 return 'Proceed' 268 274 return 'N/A'
Note: See TracChangeset for help on using the changeset viewer.
