- Timestamp:
- 10 Jun 2011, 06:58:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/workflow.py
r6318 r6322 25 25 source = None, 26 26 condition = NullCondition, 27 msg = 'appplication process initialized', 27 28 destination = INITIALIZED) 28 29 … … 30 31 transition_id = 'start', 31 32 title = 'Start application', 33 msg = 'appplication process started', 32 34 source = INITIALIZED, 33 35 destination = STARTED) … … 36 38 transition_id = 'submit', 37 39 title = 'Submit application', 40 msg = 'appplication record submitted', 38 41 source = STARTED, 39 42 destination = SUBMITTED) … … 42 45 transition_id = 'admit', 43 46 title = 'Admit applicant', 47 msg = 'appplicant admitted', 44 48 source = SUBMITTED, 45 49 destination = ADMITTED) … … 48 52 transition_id = 'refuse1', 49 53 title = 'Refuse application', 54 msg = 'appplication refused', 50 55 source = SUBMITTED, 51 56 destination = NOT_ADMITTED) … … 54 59 transition_id = 'refuse2', 55 60 title = 'Refuse application', 61 msg = 'appplication refused', 56 62 source = ADMITTED, 57 63 destination = NOT_ADMITTED) … … 60 66 transition_id = 'create', 61 67 title = 'Create student record', 68 msg = 'student record created', 62 69 source = ADMITTED, 63 70 destination = CREATED) … … 66 73 transition_id = 'reset1', 67 74 title = 'Reset application', 75 msg = 'appplication record reset', 68 76 source = SUBMITTED, 69 77 destination = STARTED) … … 72 80 transition_id = 'reset2', 73 81 title = 'Reset application', 82 msg = 'appplication record reset', 74 83 source = ADMITTED, 75 84 destination = STARTED) … … 78 87 transition_id = 'reset3', 79 88 title = 'Reset application', 89 msg = 'appplication record reset', 80 90 source = NOT_ADMITTED, 81 91 destination = STARTED) … … 84 94 transition_id = 'reset4', 85 95 title = 'Reset application', 96 msg = 'appplication record reset', 86 97 source = CREATED, 87 98 destination = STARTED) … … 161 172 """ 162 173 timestamp = datetime.now().strftime("%d/%m/%Y %H:%M:%S") 163 comment = event.comment or '(no comment)'164 174 # XXX: `messages` is meta data which shouldn't really be part of 165 175 # the Applicant class. Furthermore we should not store HTML … … 169 179 # to finetune transitions instead of doing that manually in 170 180 # UI stuff. 171 msg = '%s - %s to %s: %s: %s' % ( 172 timestamp, event.source, event.destination, event.transition.title, 173 comment) 181 msg = '%s - %s (new state: %s)' % ( 182 timestamp, event.transition.user_data['msg'], event.destination) 174 183 msgs = getattr(obj, 'messages', None) 175 if msgs != '':184 if msgs: 176 185 msgs += '<br />' 177 obj.messages += msg 186 msgs += msg 187 else: 188 msgs = msg 189 obj.messages = msgs 178 190 return
Note: See TracChangeset for help on using the changeset viewer.