## Script (Python) "validate_courses" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=student=None ##title= ## # $Id: getStudyCourseInfo.py 1504 2007-02-26 21:20:40Z henrik $ """ close the Students StudyLevel """ try: from Products.zdb import set_trace except: def set_trace(): pass request = context.REQUEST mtool = context.portal_membership member = mtool.getAuthenticatedMember() member_id = str(member) import logging logger = logging.getLogger('Skins.validate_courses') wftool = context.portal_workflow students_folder = context.portal_url.getPortalObject().campus.students student = getattr(students_folder,context.getStudentId()) wftool.doActionFor(student,'validate_courses') logger.info('%s validated course list of %s' % (member,student.getId())) psm = 'portal_status_message=Course list validated!' url = context.absolute_url() + '?' + psm return request.RESPONSE.redirect(url)