source: WAeUP_SRP/trunk/skins/waeup_student/get_student_info.py @ 529

Last change on this file since 529 was 525, checked in by joachim, 19 years ago

fixed attribute error students

File size: 875 bytes
RevLine 
[522]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=
8##title=
9##
10# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
11"""
12return Info about the current Student
13"""
14wf = context.portal_workflow
15mtool = context.portal_membership
16member = mtool.getAuthenticatedMember()
17
18info = {}
[525]19students = getattr(context,'students',None)
20if students is None:
21    students = getattr(context.campus,'students',None)
22student = getattr(students,str(member),None)
[523]23if student is None:
24    return
[525]25
[522]26info['review_state'] = wf.getInfoFor(student,'review_state','keiner')
27#info['wf_state'] = 'keiner'
28info['app'] = student.application
29info['app_doc'] = student.application.getContent()
30info['per'] = student.personal
31info['per_doc'] = student.personal.getContent()
32return info
Note: See TracBrowser for help on using the repository browser.