- Timestamp:
- 28 Mar 2007, 02:35:25 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/uli/skins/waeup_student/delete_course_result.py
r1593 r1653 14 14 15 15 from Products.CMFCore.utils import getToolByName 16 from AccessControl import Unauthorized 17 16 18 here = context 17 19 from urllib import urlencode … … 30 32 real_ids.append(id) 31 33 if real_ids: 32 context.manage_delObjects(real_ids) 33 logger.info('%s deleted StudentCourseResult object %s' % (member,id)) 34 message = 'psm_item(s)_deleted' 34 try: 35 context.manage_delObjects(real_ids) 36 logger.info('%s deleted StudentCourseResult object %s for %s' % (member,id,context.getStudentId())) 37 message = 'psm_item(s)_deleted' 38 except Unauthorized: 39 logger.info('%s has no permission to delete StudentCourseResult objects for %s' % (member,context.getStudentId())) 40 message = 'no item(s) deleted' 35 41 else: 36 42 message = 'psm_select_at_least_one_document' 37 43 38 44 args = {} 39 45 args['portal_status_message'] = message 40 url = context.absolute_url() + '/' + action_after_validate + '?' + urlencode(args) 46 47 if action_after_validate: 48 url = context.absolute_url() + '/' + action_after_validate + '?' + urlencode(args) 49 else: 50 url = context.absolute_url() + '?' + urlencode(args) 41 51 if REQUEST is not None: 42 return REQUEST.RESPONSE.redirect(url) 52 return REQUEST.RESPONSE.redirect(url)
Note: See TracChangeset for help on using the changeset viewer.