## Script (Python) "getStudentWorkflowInfo" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id: getStudentWorkflowInfo.py 1286 2007-01-12 22:27:43Z henrik $ """ return Info about the current Student """ mtool = context.portal_membership wf = context.portal_workflow member = mtool.getAuthenticatedMember() member_id = str(member) if mtool.isAnonymousUser(): return None info = {} if not context.isStudent(): return None student_id = member_id students_object = context.portal_url.getPortalObject().campus.students student = getattr(students_object, student_id) info['id'] = student_id #info['student'] = student info['url'] = student.absolute_url() review_state = info['review_state'] = wf.getInfoFor(student,'review_state',None) info['returning'] = review_state in ('returning', 'school_fee_paid', 'courses_registered', 'courses_validated', ) return info