Changeset 1583
- Timestamp:
- 19 Mar 2007, 11:07:54 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/register_courses.py
r1571 r1583 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 … … 26 27 27 28 wftool = context.portal_workflow 28 wftool.doActionFor(context,'close')29 29 students_folder = context.portal_url.getPortalObject().campus.students 30 student = getattr(students_folder,context.getStudentId()) 31 wftool.doActionFor(student,'register_courses') 32 logger.info('%s registered course list' % student.getId()) 30 student_id = context.getStudentId() 31 student = getattr(students_folder,student_id) 32 try: 33 wftool.doActionFor(context,'close') 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 try: 38 wftool.doActionFor(student,'register_courses') 39 except WorkflowException,E: 40 logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id)) 41 return request.RESPONSE.redirect("%s" % context.absolute_url()) 42 logger.info('%s registered course list for %s' % (member_id,student_id)) 33 43 return request.RESPONSE.redirect("%s" % context.absolute_url())
Note: See TracChangeset for help on using the changeset viewer.