source: WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py @ 627

Last change on this file since 627 was 603, checked in by Henrik Bettermann, 18 years ago

batch of fixes to open the frontend for the first time

File size: 1.2 KB
RevLine 
[535]1## Script (Python) "cpsdocument_edit"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=student=None
8##title=
9##
10# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
11"""
12return Info about the current Student
13"""
14request = context.REQUEST
[563]15form = request.form
16fget = form.get
[535]17wf = context.portal_workflow
18mtool = context.portal_membership
19member = mtool.getAuthenticatedMember()
20path_info = request.get('PATH_INFO').split('/')
[563]21roles = member.getRoles()
[535]22info = {}
[603]23info['is_manager'] = context.isManager
[535]24member_id = str(member)
25if student is None:
26    students = getattr(context,'students',None)
27    if students is None:
28        students = getattr(context.campus,'students',None)
29    student = getattr(students,member_id,None)
30    if student is None:
31        return None
32info['review_state'] = wf.getInfoFor(student,'review_state','keiner')
33#info['wf_state'] = 'keiner'
34info['student'] = student
[584]35info['id'] = student.getId()
[538]36info['student_doc'] = student.getContent()
[535]37info['app'] = student.application
38info['app_doc'] = student.application.getContent()
39info['per'] = student.personal
40info['per_doc'] = student.personal.getContent()
41return info
Note: See TracBrowser for help on using the repository browser.