Changeset 2720 for WAeUP_SRP/base/skins
- Timestamp:
- 20 Nov 2007, 21:49:53 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/deactivate_students.py
r2601 r2720 45 45 for student_id in ids: 46 46 student = getattr(students_folder,student_id,None) 47 student_state = context.portal_workflow.getInfoFor(student,'review_state',None) 47 48 if student is not None: 48 49 for object in student.objectValues(): 49 50 if context.portal_workflow.getInfoFor(object,'review_state',None) in ('open','created'): 50 51 context.portal_workflow.doActionFor(object,'close') 51 context.portal_workflow.doActionFor(student,'deactivate') 52 logger.info("%s deactivated student %s" % (member,student_id)) 52 try: 53 context.portal_workflow.doActionFor(student,'deactivate') 54 except: 55 logger.info("%s failed to deactivate student %s in state %s" % (member,student_id,student_state)) 56 deleted_list.append(student_id + ' (failed)') 57 continue 58 logger.info("%s deactivated student %s" % (member,student_id)) 53 59 deleted_list.append(student_id) 54 60 else: 55 61 logger.info("Student object %s not found" % (student_id)) 56 62 continue 57 psm = " %s deactivated" % ' '.join(deleted_list)63 psm = "Deactivated: %s" % ' '.join(deleted_list) 58 64 59 65 if student_ids:
Note: See TracChangeset for help on using the changeset viewer.