- Timestamp:
- 19 Mar 2007, 18:57:54 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/uli/skins/waeup_student/validate_courses.py
r1513 r1593 1 ## Script (Python) " getStudyCourseInfo"1 ## Script (Python) "validate_courses" 2 2 ##bind container=container 3 3 ##bind context=context … … 5 5 ##bind script=script 6 6 ##bind subpath=traverse_subpath 7 ##parameters=student=None 7 ##parameters=student=None, action_after_reject=None, action_after_validate=None 8 8 ##title= 9 9 ## … … 12 12 close the Students StudyLevel 13 13 """ 14 from Products.CMFCore.WorkflowCore import WorkflowException 14 15 try: 15 16 from Products.zdb import set_trace … … 23 24 member_id = str(member) 24 25 import logging 25 logger = logging.getLogger('S tudent.validate_courses')26 logger = logging.getLogger('Skins.validate_courses') 26 27 27 28 wftool = context.portal_workflow 28 29 students_folder = context.portal_url.getPortalObject().campus.students 29 student = getattr(students_folder,context.getStudentId()) 30 wftool.doActionFor(student,'validate_courses') 31 logger.info('"%s","validated courses for","%s"' % (member,student.getId())) 32 return request.RESPONSE.redirect("%s" % context.absolute_url()) 30 student_id = context.getStudentId() 31 student = getattr(students_folder,student_id) 32 try: 33 wftool.doActionFor(student,'validate_courses') 34 except WorkflowException,E: 35 logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id)) 36 return request.RESPONSE.redirect("%s" % context.absolute_url()) 37 logger.info('%s validated course list of %s' % (member_id,student_id)) 38 39 psm = 'portal_status_message=Course list validated!' 40 url = context.absolute_url() + '/' + action_after_validate + '?' + psm 41 return request.RESPONSE.redirect(url)
Note: See TracChangeset for help on using the changeset viewer.