Changeset 15013 for main/kofacustom.edopoly/trunk/src/kofacustom
- Timestamp:
- 20 May 2018, 19:44:44 (7 years ago)
- Location:
- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interfaces.py
r15011 r15013 49 49 ) 50 50 51 late_registration_fee = schema.Float( 52 title = _(u'Late Course Reg. Fee'), 53 default = 0.0, 54 required = False, 55 ) 56 57 transcript_fee = schema.Float( 58 title = _(u'Transcript Fee'), 59 default = 0.0, 60 required = False, 61 ) 62 63 transfer_fee = schema.Float( 64 title = _(u'Transfer Fee'), 65 default = 0.0, 66 required = False, 67 ) 68 51 69 # Additional fees in custom package add here 52 70 53 logboo k_fee = schema.Float(54 title = _(u'Logbook Fee'),71 logbool_combo_fee = schema.Float( 72 title = _(u'Logbook Combo Fee'), 55 73 default = 0.0, 56 74 required = False, … … 59 77 ict_entre_fee = schema.Float( 60 78 title = _(u'ICT & Entrepreneur Fee'), 79 default = 0.0, 80 required = False, 81 ) 82 83 siwess_combo_fee = schema.Float( 84 title = _(u'SIWESS Combo Fee'), 61 85 default = 0.0, 62 86 required = False, -
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/studylevel.py
r15000 r15013 52 52 53 53 class CustomCourseTicket(CourseTicket): 54 """This is a course ticket which allows the 55 student to attend the course. Lecturers will enter scores and more at 56 the end of the term. 57 58 A course ticket contains a copy of the original course and 59 course referrer data. If the courses and/or their referrers are removed, the 60 corresponding tickets remain unchanged. So we do not need any event 61 triggered actions on course tickets. 54 """ 62 55 """ 63 56 grok.implements(ICustomCourseTicket, IStudentNavigation) 64 57 grok.provides(ICustomCourseTicket) 65 58 59 @property 60 def _getGradeWeightFromScore(self): 61 """EdoPoly Course Grading System 62 """ 63 if self.total_score is None: 64 return (None, None) 65 if self.total_score >= 75: 66 return ('AA',4) 67 if self.total_score >= 70: 68 return ('A',3.5) 69 if self.total_score >= 65: 70 return ('AB',3.25) 71 if self.total_score >= 60: 72 return ('B',3.0) 73 if self.total_score >= 55: 74 return ('BC',2.75) 75 if self.total_score >= 50: 76 return ('C',2.5) 77 if self.total_score >= 45: 78 return ('CD',2.25) 79 if self.total_score >= 40: 80 return ('D',2) 81 return ('F',0) 66 82 67 83 CustomCourseTicket = attrs_to_fields(CustomCourseTicket) -
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py
r15011 r15013 31 31 STUDENT_ID_PREFIX = u'U' 32 32 33 def GPABoundaries(self, faccode=None, depcode=None, certcode=None): 34 return ((1, 'Fail'), 35 (1.5, 'Pass'), 36 (2.4, '3rd Class'), 37 (3.5, '2nd Class Lower'), 38 (4.5, '2nd Class Upper'), 39 (5, '1st Class')) 33 def GPABoundaries(self, faccode=None, depcode=None, 34 certcode=None, student=None): 35 if student and student.current_mode.startswith('dp'): 36 return ((1, 'IRNS / NER / NYV'), 37 (2, 'Pass'), 38 (2.5, 'Lower Credit'), 39 (3, 'Upper Credit'), 40 (3.5, 'Distinction')) 41 elif student: 42 return ((1, 'FRNS / NER / NYV'), 43 (1.5, 'Pass'), 44 (2.4, '3rd Class Honours'), 45 (3.5, '2nd Class Honours Lower Division'), 46 (4.5, '2nd Class Honours Upper Division'), 47 (5, '1st Class Honours')) 48 # Session Results Presentations depend on certificate 49 results = None 50 if certcode: 51 cat = queryUtility(ICatalog, name='certificates_catalog') 52 results = list( 53 cat.searchResults(code=(certcode, certcode))) 54 if results and results[0].study_mode.startswith('dp'): 55 return ((1, 'IRNS / NER / NYV'), 56 (2, 'Pass'), 57 (2.5, 'Lower Credit'), 58 (3, 'Upper Credit'), 59 (3.5, 'Distinction')) 60 else: 61 return ((1, 'FRNS / NER / NYV'), 62 (1.5, 'Pass'), 63 (2.4, '3rd Class Honours'), 64 (3.5, '2nd Class Honours Lower Division'), 65 (4.5, '2nd Class Honours Upper Division'), 66 (5, '1st Class Honours')) 67 68 def getClassFromCGPA(self, gpa, student): 69 gpa_boundaries = self.GPABoundaries(student=student) 70 if gpa < gpa_boundaries[0][0]: 71 return 0, gpa_boundaries[0][1] 72 if gpa < gpa_boundaries[1][0]: 73 return 1, gpa_boundaries[1][1] 74 if gpa < gpa_boundaries[2][0]: 75 return 2, gpa_boundaries[2][1] 76 if gpa < gpa_boundaries[3][0]: 77 return 3, gpa_boundaries[3][1] 78 if gpa < gpa_boundaries[4][0]: 79 return 4, gpa_boundaries[4][1] 80 if gpa <= gpa_boundaries[5][0]: 81 return 5, gpa_boundaries[5][1] 82 return 'N/A' 40 83 41 84 def setPaymentDetails(self, category, student, … … 130 173 else: 131 174 return _(u'No bed allocated.'), None 132 elif category == 'logbook ':133 amount = academic_session.logbook_ fee175 elif category == 'logbook_combo': 176 amount = academic_session.logbook_combo_fee 134 177 elif category == 'ict_entre': 135 178 amount = academic_session.ict_entre_fee 179 elif category == 'siwess_combo': 180 amount = academic_session.siwess_combo_fee 136 181 if amount in (0.0, None): 137 182 return _('Amount could not be determined.'), None -
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/utils/utils.py
r15011 r15013 26 26 27 27 PAYMENT_CATEGORIES = { 28 'schoolfee': ' SchoolFee',28 'schoolfee': 'Tuition Fee', 29 29 'clearance': 'Acceptance Fee', 30 30 'bed_allocation': 'Accommodation Booking Fee', … … 32 32 'application': 'Application Fee', 33 33 'ict_entre': 'ICT & Entrepreneur Fee', 34 'logbook': 'Logbook Fee', 34 'logbook_combo': 'Logbook Combo Fee', 35 'siwess_combo': 'SIWESS Combo Fee' 35 36 } 36 37
Note: See TracChangeset for help on using the changeset viewer.