Changeset 8498 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 23 May 2012, 07:44:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r8491 r8498 181 181 182 182 # Update password 183 passwd = row.get('password', IGNORE_MARKER) 184 if passwd not in ('', IGNORE_MARKER): 185 if passwd.startswith('{SSHA}'): 186 # already encrypted password 187 obj.password = passwd 188 else: 189 # not yet encrypted password 190 IUserAccount(obj).setPassword(passwd) 183 if row.has_key('password'): 184 passwd = row.get('password', IGNORE_MARKER) 185 if passwd not in ('', IGNORE_MARKER): 186 if passwd.startswith('{SSHA}'): 187 # already encrypted password 188 obj.password = passwd 189 else: 190 # not yet encrypted password 191 IUserAccount(obj).setPassword(passwd) 192 items_changed += ('%s=%s, ' % ('password', passwd)) 191 193 row.pop('password') 192 194 193 195 # Update registration state 194 state = row.get('state', IGNORE_MARKER) 195 if state not in (IGNORE_MARKER, ''): 196 value = row['state'] 197 IWorkflowState(obj).setState(value) 198 msg = _("State '${a}' set", mapping = {'a':value}) 199 history = IObjectHistory(obj) 200 history.addMessage(msg) 196 if row.has_key('state'): 197 state = row.get('state', IGNORE_MARKER) 198 if state not in (IGNORE_MARKER, ''): 199 value = row['state'] 200 IWorkflowState(obj).setState(value) 201 msg = _("State '${a}' set", mapping = {'a':value}) 202 history = IObjectHistory(obj) 203 history.addMessage(msg) 204 items_changed += ('%s=%s, ' % ('state', state)) 201 205 row.pop('state') 202 transition = row.get('transition', IGNORE_MARKER) 203 if transition not in (IGNORE_MARKER, ''): 204 value = row['transition'] 205 IWorkflowInfo(obj).fireTransition(value) 206 207 if row.has_key('transition'): 208 transition = row.get('transition', IGNORE_MARKER) 209 if transition not in (IGNORE_MARKER, ''): 210 value = row['transition'] 211 IWorkflowInfo(obj).fireTransition(value) 212 items_changed += ('%s=%s, ' % ('transition', transition)) 206 213 row.pop('transition') 207 214 208 215 # apply other values... 209 items_changed = super(StudentProcessor, self).updateEntry(216 items_changed += super(StudentProcessor, self).updateEntry( 210 217 obj, row, site) 211 218
Note: See TracChangeset for help on using the changeset viewer.