## Script (Python) "folder_delete" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=ids=[], REQUEST=None ##title= ## # $Id: retract_checked.py 486 2006-09-06 10:09:39Z joachim $ """ FIXME: add docstring. """ ret_url = context.absolute_url() + '/academics_contents' if ids: for id in ids: ob = getattr(context, id) if context.portal_workflow.getInfoFor(ob,'review_state',None) == "checked": ob.content_status_modify(workflow_action="retract") message = 'portal_status_message=workflow status changed' else: message = 'portal_status_message=psm_select_at_least_one_document' if REQUEST is not None: return REQUEST.RESPONSE.redirect(ret_url + '?' + message)