Last change
on this file since 3980 was
1219,
checked in by Henrik Bettermann, 18 years ago
|
waeup_default/waeup_document_view slimmed down and fixed
|
-
Property svn:keywords set to
Id
|
File size:
500 bytes
|
Rev | Line | |
---|
[1161] | 1 | ## Script (Python) "getStudentName" |
---|
[1071] | 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: getStudentName.py 1219 2007-01-07 08:29:13Z henrik $ |
---|
| 11 | """ |
---|
| 12 | return Info about the current Student |
---|
| 13 | """ |
---|
| 14 | mtool = context.portal_membership |
---|
| 15 | member = mtool.getAuthenticatedMember() |
---|
| 16 | if mtool.isAnonymousUser(): |
---|
| 17 | return None |
---|
[1077] | 18 | if not context.isStudent(): |
---|
[1071] | 19 | return None |
---|
[1077] | 20 | res = context.students_catalog(id = str(member)) |
---|
[1071] | 21 | if len(res) != 1: |
---|
| 22 | return None |
---|
| 23 | return res[0].name |
---|
Note: See
TracBrowser for help on using the repository browser.