## Script (Python) "cpsdocument_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=student=None ##title= ## # $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $ """ return Info about the current Student """ request = context.REQUEST wf = context.portal_workflow mtool = context.portal_membership member = mtool.getAuthenticatedMember() path_info = request.get('PATH_INFO').split('/') info = {} member_id = str(member) ##if member_id not in path_info: ## return None if student is None: students = getattr(context,'students',None) if students is None: students = getattr(context.campus,'students',None) student = getattr(students,member_id,None) if student is None: return None info['review_state'] = wf.getInfoFor(student,'review_state','keiner') #info['wf_state'] = 'keiner' info['student'] = student info['student_doc'] = student.getContent() info['app'] = student.application info['app_doc'] = student.application.getContent() info['per'] = student.personal info['per_doc'] = student.personal.getContent() return info