Last change
on this file since 529 was
525,
checked in by joachim, 19 years ago
|
fixed attribute error students
|
File size:
875 bytes
|
Rev | Line | |
---|
[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 | """ |
---|
| 12 | return Info about the current Student |
---|
| 13 | """ |
---|
| 14 | wf = context.portal_workflow |
---|
| 15 | mtool = context.portal_membership |
---|
| 16 | member = mtool.getAuthenticatedMember() |
---|
| 17 | |
---|
| 18 | info = {} |
---|
[525] | 19 | students = getattr(context,'students',None) |
---|
| 20 | if students is None: |
---|
| 21 | students = getattr(context.campus,'students',None) |
---|
| 22 | student = getattr(students,str(member),None) |
---|
[523] | 23 | if student is None: |
---|
| 24 | return |
---|
[525] | 25 | |
---|
[522] | 26 | info['review_state'] = wf.getInfoFor(student,'review_state','keiner') |
---|
| 27 | #info['wf_state'] = 'keiner' |
---|
| 28 | info['app'] = student.application |
---|
| 29 | info['app_doc'] = student.application.getContent() |
---|
| 30 | info['per'] = student.personal |
---|
| 31 | info['per_doc'] = student.personal.getContent() |
---|
| 32 | return info |
---|
Note: See
TracBrowser for help on using the repository browser.