- Timestamp:
- 2 Nov 2016, 11:34:48 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py
r14234 r14248 152 152 ) 153 153 154 text_book_1_fee = schema.Float( 155 title = _(u'Text Book Fee GST101 GST102'), 156 default = 0.0, 157 required = True, 158 ) 159 160 text_book_2_fee = schema.Float( 161 title = _(u'Text Book Fee GST111 GST112'), 162 default = 0.0, 163 required = True, 164 ) 165 166 text_book_3_fee = schema.Float( 167 title = _(u'Text Book Fee GST222'), 168 default = 0.0, 169 required = True, 170 ) 171 172 text_book_4_fee = schema.Float( 173 title = _(u'Text Book Fee ENT201'), 174 default = 0.0, 175 required = True, 176 ) 177 178 registration_1_fee = schema.Float( 179 title = _(u'Registration Fee GST101 GST102 GST111 GST112'), 180 default = 0.0, 181 required = True, 182 ) 183 184 registration_2_fee = schema.Float( 185 title = _(u'Registration Fee GST222'), 186 default = 0.0, 187 required = True, 188 ) 189 190 registration_3_fee = schema.Float( 191 title = _(u'Registration Fee ENT201'), 192 default = 0.0, 193 required = True, 194 ) 195 196 fac_dep_fee = schema.Float( 197 title = _(u'Faculty Dues'), 198 default = 0.0, 199 required = True, 200 ) 201 154 202 coursereg_deadline = schema.Datetime( 155 203 title = _(u'FT Course Reg. Deadline'), -
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r14235 r14248 167 167 site_name = SITE_NAME 168 168 currency = CURRENCY 169 #pay_item_id = '101'169 pay_item_id = '000' 170 170 171 171 def update(self): -
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r14227 r14248 35 35 from waeup.aaue.students.interfaces import ( 36 36 ICustomStudentStudyLevel, ICustomCourseTicket) 37 from waeup.aaue.interfaces import MessageFactory as _ 37 38 38 39 … … 99 100 100 101 @property 101 def course_registration_allowed(self): 102 def course_registration_forbidden(self): 103 fac_dep_paid = False 104 if self.student.entry_session >= 2016: 105 for ticket in self.student['payments'].values(): 106 if ticket.p_category == 'fac_dep' and \ 107 ticket.p_session == self.level_session and \ 108 ticket.p_state == 'paid': 109 fac_dep_paid = True 110 continue 111 if not fac_dep_paid: 112 return _("Please pay faculty and departmental dues first.") 102 113 if self.student.is_fresh: 103 return True114 return 104 115 try: 105 116 if self.student.is_postgrad: … … 119 130 str(self.level_session)].coursereg_deadline 120 131 except (TypeError, KeyError): 121 return True132 return 122 133 if not deadline or deadline > datetime.now(pytz.utc): 123 return True 124 payment_made = False 134 return 125 135 if len(self.student['payments']): 126 136 for ticket in self.student['payments'].values(): … … 128 138 ticket.p_session == self.level_session and \ 129 139 ticket.p_state == 'paid': 130 payment_made = True 131 if payment_made: 132 return True 133 return False 140 return 141 return _("Course registration has ended. " 142 "Please pay the late registration fee.") 134 143 135 144 # only AAUE -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14246 r14248 831 831 return 832 832 833 def test_course_registration_forbidden(self): 834 IWorkflowState(self.student).setState('school fee paid') 835 self.student['studycourse'].entry_session = 2016 836 self.student['studycourse'].current_session = 2016 837 self.browser.open(self.login_path) 838 self.browser.getControl(name="form.login").value = self.student_id 839 self.browser.getControl(name="form.password").value = 'spwd' 840 self.browser.getControl("Login").click() 841 self.browser.getLink("Study Course").click() 842 self.browser.getLink("Add course list").click() 843 self.browser.getControl("Create course list now").click() 844 self.browser.getLink("Edit course list").click() 845 self.browser.getControl("Register course list").click() 846 self.assertTrue('Please pay faculty and departmental dues first' 847 in self.browser.contents) 848 849 configuration_1 = createObject('waeup.SessionConfiguration') 850 configuration_1.academic_session = 2016 851 configuration_1.fac_dep_fee = 9999.0 852 self.app['configuration'].addSessionConfiguration(configuration_1) 853 854 self.browser.open(self.payments_path + '/addop') 855 self.browser.getControl(name="form.p_category").value = ['fac_dep'] 856 self.browser.getControl("Create ticket").click() 857 self.student['payments'].values()[0].approveStudentPayment() 858 self.browser.open(self.studycourse_path + '/100/edit') 859 self.browser.getControl("Register course list").click() 860 self.assertTrue('Course list has been registered' 861 in self.browser.contents) 862 return 863 833 864 def test_student_clearance(self): 834 865 # Student cant login if their password is not set -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r14246 r14248 200 200 else: 201 201 return _(u'No bed allocated.'), None 202 elif category == 'welfare' and not student.is_postgrad:203 amount = academic_session.welfare_fee204 elif category == 'id_card' and not student.is_postgrad:205 amount = academic_session.id_card_fee206 elif category == 'union' and not student.is_postgrad:207 amount = academic_session.union_fee208 elif category == 'lapel' and not student.is_postgrad:209 amount = academic_session.lapel_fee210 elif category == 'matric_gown' and not student.is_postgrad:211 amount = academic_session.matric_gown_fee212 elif category == 'concessional' and not student.is_postgrad:213 amount = academic_session.concessional_fee214 202 elif student.current_mode == 'found' and category not in ( 215 203 'schoolfee', 'clearance', 'late_registration'): … … 327 315 else: 328 316 amount += academic_session.penalty_ug 317 elif not student.is_postgrad: 318 fee_name = category + '_fee' 319 amount = getattr(academic_session, fee_name, 0.0) 329 320 if amount in (0.0, None): 330 321 return _(u'Amount could not be determined.'), None -
main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py
r14246 r14248 48 48 'concessional': 'Concessional Fee', 49 49 'id_card': 'Student ID Card', 50 'text_book_1': 'Text Book Fee GST101 GST102', 51 'text_book_2': 'Text Book Fee GST111 GST112', 52 'text_book_3': 'Text Book Fee GST222', 53 'text_book_4': 'Text Book Fee ENT201', 54 'registration_1': 'Registration Fee GST101 GST102 GST111 GST112', 55 'registration_2': 'Registration Fee GST222', 56 'registration_3': 'Registration Fee ENT201', 57 'fac_dep': 'Faculty and Departmental Dues', 50 58 } 51 59 … … 69 77 'concessional': 'Concessional Fee', 70 78 #'id_card': 'Student ID Card', 79 'text_book_1': 'Text Book Fee GST101 GST102', 80 'text_book_2': 'Text Book Fee GST111 GST112', 81 'text_book_3': 'Text Book Fee GST222', 82 'text_book_4': 'Text Book Fee ENT201', 83 'registration_1': 'Registration Fee GST101 GST102 GST111 GST112', 84 'registration_2': 'Registration Fee GST222', 85 'registration_3': 'Registration Fee ENT201', 86 'fac_dep': 'Faculty and Departmental Dues', 71 87 } 72 88 … … 91 107 'matric_gown': 'Matriculation Gown Fee', 92 108 'id_card': 'Student ID Card', 109 'text_book_1': 'Text Book Fee GST101 GST102', 110 'text_book_2': 'Text Book Fee GST111 GST112', 111 'text_book_3': 'Text Book Fee GST222', 112 'text_book_4': 'Text Book Fee ENT201', 113 'registration_1': 'Registration Fee GST101 GST102 GST111 GST112', 114 'registration_2': 'Registration Fee GST222', 115 'registration_3': 'Registration Fee ENT201', 116 'fac_dep': 'Faculty and Departmental Dues', 93 117 } 94 118
Note: See TracChangeset for help on using the changeset viewer.