## 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: folder_delete.py 30246 2005-12-02 20:10:18Z fguillaume $ """ 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) == "unchecked": ob.content_status_modify(workflow_action="approve") 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)