Changeset 8270
- Timestamp:
- 25 Apr 2012, 06:45:16 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py
r8265 r8270 344 344 """A student payment via payment gateways. 345 345 346 """ 346 This Interface does not inherit from IStudentOnlinePayment. 347 Thus all fields from IStudentOnlinePayment have to be repeated here. 348 """ 349 350 p_level = schema.Int( 351 title = _(u'Payment Level'), 352 required = False, 353 readonly = True, 354 ) 355 ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[ 356 'p_session'].order -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r8265 r8270 78 78 79 79 # not yet changed 80 def setReturningData(self, student): 81 student['studycourse'].current_level += 100 82 student['studycourse'].current_session += 1 83 verdict = student['studycourse'].current_verdict 84 student['studycourse'].current_verdict = '0' 85 student['studycourse'].previous_verdict = verdict 86 return 80 def getReturningData(self, student): 81 """ This method defines what happens after school fee payment 82 depending on the student's senate verdict. 83 84 In the base configuration current level is always increased 85 by 100 no matter which verdict has been assigned. 86 """ 87 new_level = student['studycourse'].current_level + 100 88 new_session = student['studycourse'].current_session + 1 89 return new_session, new_level 87 90 88 91 def getPaymentDetails(self, category, student): … … 93 96 d['p_session'] = student['studycourse'].current_session 94 97 session = str(d['p_session']) 98 d['p_level'] = student['studycourse'].current_level 95 99 try: 96 100 academic_session = grok.getSite()['configuration'][session] … … 113 117 code = student['studycourse'].certificate.code 114 118 d['p_item'] = code 115 d['p_session'] += 1 119 # In case of school fee payment the payment session and level 120 # contain the values of the session the student has paid for 121 d['p_session'], d['p_level'] = self.getReturningData(student) 116 122 if d['amount'] == 0.0: 117 123 d['error'] = _(u'Amount could not be determined.')
Note: See TracChangeset for help on using the changeset viewer.