|
Last change
on this file since 17841 was
1389,
checked in by Henrik Bettermann, 20 years ago
|
|
neue sorgfältig getestete Version
(macht noch keine Änderungen)
|
|
File size:
635 bytes
|
| Line | |
|---|
| 1 | ## Script (Python) "get_entry_mode" |
|---|
| 2 | ##bind container=container |
|---|
| 3 | ##bind context=context |
|---|
| 4 | ##bind namespace= |
|---|
| 5 | ##bind script=script |
|---|
| 6 | ##bind subpath=traverse_subpath |
|---|
| 7 | ##parameters=sid |
|---|
| 8 | ##title= |
|---|
| 9 | ## |
|---|
| 10 | # $Id: getFromData_entry_mode.py 1328 2007-01-19 18:16:32Z joachim $ |
|---|
| 11 | """ |
|---|
| 12 | return entry_mode from application-object. |
|---|
| 13 | """ |
|---|
| 14 | students = context.portal_url.getPortalObject().campus.students |
|---|
| 15 | student = getattr(students,sid,None) |
|---|
| 16 | if student is None: |
|---|
| 17 | return None |
|---|
| 18 | app = getattr(student,'application',None) |
|---|
| 19 | if app is None: |
|---|
| 20 | return "nyr" |
|---|
| 21 | #from Products.zdb import set_trace;set_trace() |
|---|
| 22 | em = app.getContent().entry_mode |
|---|
| 23 | if em: |
|---|
| 24 | return em |
|---|
| 25 | return "none" |
|---|
| 26 | |
|---|
Note: See
TracBrowser for help on using the repository browser.