## Script (Python) "getStudentInfo" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id: getStudentWorkflowInfo.py 1077 2006-12-18 19:44:57Z joachim $ """ 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() info['review_state'] = wf.getInfoFor(student,'review_state',None) return info