source: WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/course_result_delete.py @ 1593

Last change on this file since 1593 was 1558, checked in by joachim, 18 years ago

merged trunk up to 1557

  • Property svn:keywords set to Id
File size: 747 bytes
Line 
1## Script (Python) "folder_delete"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=ids=[], REQUEST=None
8##title=
9##
10# $Id: course_result_delete.py 1558 2007-03-15 16:44:41Z joachim $
11"""
12FIXME: add docstring.
13"""
14
15from Products.CMFCore.utils import getToolByName
16here = context
17
18ret_url = here.absolute_url()
19
20message = ''
21if ids:
22    real_ids = []
23    for id in ids:
24        if context.hasObject(id):
25            real_ids.append(id)
26    if real_ids:
27        context.manage_delObjects(real_ids)
28        message = 'portal_status_message=psm_item(s)_deleted'
29else:
30    message = 'portal_status_message=psm_select_at_least_one_document'
31
32if REQUEST is not None:
33    return REQUEST.RESPONSE.redirect(ret_url + '?' + message)
Note: See TracBrowser for help on using the repository browser.