- Timestamp:
- 7 Jan 2017, 07:25:14 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py
r14355 r14375 212 212 ) 213 213 214 restitution_fee = schema.Float( 215 title = _(u'Restitution Fee'), 216 default = 0.0, 217 required = True, 218 ) 219 214 220 coursereg_deadline = schema.Datetime( 215 221 title = _(u'FT Course Reg. Deadline'), -
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r14370 r14375 127 127 if not fac_dep_paid: 128 128 return _("Please pay faculty and departmental dues first.") 129 restitution_paid = True 130 if self.student.entry_session < 2016 \ 131 and self.student.current_mode == 'ug_ft': 132 restitution_paid = False 133 for ticket in self.student['payments'].values(): 134 if ticket.p_category == 'restitution' and \ 135 ticket.p_session == self.level_session and \ 136 ticket.p_state == 'paid': 137 restitution_paid = True 138 continue 139 if not restitution_paid: 140 return _("Please pay restitution fee first.") 129 141 if self.student.is_fresh: 130 142 return -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14362 r14375 588 588 589 589 def test_late_registration(self): 590 # Login590 self.app['configuration']['2004'].restitution_fee = 9999.0 591 591 delta = timedelta(days=10) 592 592 self.app['configuration'][ … … 596 596 # returning students. 597 597 self.student['studycourse'].entry_session = 2003 598 self.browser.open(self.login_path) 599 self.browser.getControl(name="form.login").value = self.student_id 600 self.browser.getControl(name="form.password").value = 'spwd' 601 self.browser.getControl("Login").click() 602 self.browser.open(self.payments_path) 598 # Login 599 self.browser.open(self.login_path) 600 self.browser.getControl(name="form.login").value = self.student_id 601 self.browser.getControl(name="form.password").value = 'spwd' 602 self.browser.getControl("Login").click() 603 # Make restitution fee payment 604 self.browser.open(self.payments_path + '/addop') 605 self.browser.getControl(name="form.p_category").value = ['restitution'] 606 self.browser.getControl("Create ticket").click() 607 self.student['payments'].values()[0].approveStudentPayment() 608 # Make late registration fee fee payment 603 609 self.browser.open(self.payments_path + '/addop') 604 610 self.browser.getControl(name="form.p_category").value = ['late_registration'] … … 619 625 self.browser.getControl("Register course list").click() 620 626 self.assertTrue('Course registration has ended. Please pay' in self.browser.contents) 621 self.student['payments'].values()[ 0].approve()627 self.student['payments'].values()[1].approve() 622 628 self.browser.getControl("Register course list").click() 623 629 self.assertTrue('Course list has been registered' in self.browser.contents) … … 626 632 # register courses. 627 633 self.student['studycourse'].entry_session = 2004 628 del self.student['payments'][self.student['payments'].keys()[ 0]]634 del self.student['payments'][self.student['payments'].keys()[1]] 629 635 IWorkflowState(self.student).setState('school fee paid') 630 636 self.browser.open(self.studycourse_path + '/100/edit') … … 932 938 self.assertTrue('Please pay faculty and departmental dues first' 933 939 in self.browser.contents) 934 935 940 configuration_1 = createObject('waeup.SessionConfiguration') 936 941 configuration_1.academic_session = 2016 937 942 configuration_1.fac_dep_fee = 9999.0 938 943 self.app['configuration'].addSessionConfiguration(configuration_1) 939 940 944 self.browser.open(self.payments_path + '/addop') 941 945 self.browser.getControl(name="form.p_category").value = ['fac_dep'] 946 self.browser.getControl("Create ticket").click() 947 self.student['payments'].values()[0].approveStudentPayment() 948 self.browser.open(self.studycourse_path + '/100/edit') 949 self.browser.getControl("Register course list").click() 950 self.assertTrue('Course list has been registered' 951 in self.browser.contents) 952 return 953 954 def test_course_registration_forbidden_2(self): 955 IWorkflowState(self.student).setState('school fee paid') 956 self.student['studycourse'].entry_session = 2004 957 self.student['studycourse'].current_session = 2004 958 self.browser.open(self.login_path) 959 self.browser.getControl(name="form.login").value = self.student_id 960 self.browser.getControl(name="form.password").value = 'spwd' 961 self.browser.getControl("Login").click() 962 self.browser.getLink("Study Course").click() 963 self.browser.getLink("Add course list").click() 964 self.browser.getControl("Create course list now").click() 965 self.browser.getLink("Edit course list").click() 966 self.browser.getControl("Register course list").click() 967 self.assertTrue('Please pay restitution fee first' 968 in self.browser.contents) 969 self.app['configuration']['2004'].restitution_fee = 9999.0 970 self.browser.open(self.payments_path + '/addop') 971 self.browser.getControl(name="form.p_category").value = ['restitution'] 942 972 self.browser.getControl("Create ticket").click() 943 973 self.student['payments'].values()[0].approveStudentPayment() -
main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py
r14355 r14375 58 58 'ent_registration_3': 'Registration Fee ENT201', 59 59 'fac_dep': 'Faculty and Departmental Dues', 60 'restitution': 'Restitution Fee', 60 61 } 61 62 … … 89 90 'ent_registration_3': 'Registration Fee ENT201', 90 91 'fac_dep': 'Faculty and Departmental Dues', 92 'restitution': 'Restitution Fee', 91 93 } 92 94 … … 119 121 'ent_registration_3': 'Registration Fee ENT201', 120 122 'fac_dep': 'Faculty and Departmental Dues', 123 'restitution': 'Restitution Fee', 121 124 } 122 125
Note: See TracChangeset for help on using the changeset viewer.