Changeset 7615 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 9 Feb 2012, 06:22:43 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
r7511 r7615 82 82 return sid 83 83 84 def set_returning_data(student):85 student['studycourse'].current_level += 10086 student['studycourse'].current_session += 187 verdict = student['studycourse'].current_verdict88 student['studycourse'].current_verdict = '0'89 student['studycourse'].previous_verdict = verdict90 return91 92 84 def set_up_widgets(view, ignore_request=False): 93 85 view.adapters = {} … … 172 164 grok.implements(IStudentsUtils) 173 165 174 def getPaymentDetails(self,category, student): 166 def setReturningData(self, student): 167 student['studycourse'].current_level += 100 168 student['studycourse'].current_session += 1 169 verdict = student['studycourse'].current_verdict 170 student['studycourse'].current_verdict = '0' 171 student['studycourse'].previous_verdict = verdict 172 return 173 174 def getPaymentDetails(self, category, student): 175 175 d = {} 176 176 d['p_item'] = u'' -
main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py
r7535 r7615 2 2 """ 3 3 import grok 4 from zope.component import getUtility 4 5 from hurry.workflow.workflow import Transition, WorkflowState, NullCondition 5 6 from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent 6 7 from waeup.sirp.interfaces import ( 7 IObjectHistory, ISIRPWorkflowInfo, 8 IObjectHistory, ISIRPWorkflowInfo, 8 9 CREATED, ADMITTED, CLEARANCE, REQUESTED, CLEARED, PAID, RETURNING, 9 10 REGISTERED, VALIDATED) 10 11 from waeup.sirp.workflow import SIRPWorkflow, SIRPWorkflowInfo 11 12 from waeup.sirp.utils.helpers import get_current_principal 12 from waeup.sirp.students.interfaces import IStudent 13 from waeup.sirp.students.utils import set_returning_data 13 from waeup.sirp.students.interfaces import IStudent, IStudentsUtils 14 14 15 15 16 IMPORTABLE_STATES = (ADMITTED, CLEARANCE, REQUESTED, CLEARED, PAID, RETURNING, … … 195 196 # current session, current level, and current verdict 196 197 if event.transition.transition_id == 'pay_school_fee': 197 set_returning_data(obj)198 getUtility(IStudentsUtils).setReturningData(obj) 198 199 # In some tests we don't have a students container or a user 199 200 try:
Note: See TracChangeset for help on using the changeset viewer.