Last change
on this file since 1070 was
1067,
checked in by joachim, 18 years ago
|
a lot of optimizations
|
-
Property svn:keywords set to
Id
|
File size:
417 bytes
|
Line | |
---|
1 | ## Script (Python) "getStudentId" |
---|
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: getStudentId.py 1067 2006-12-15 17:43:18Z joachim $ |
---|
11 | """ |
---|
12 | return StudentId from request |
---|
13 | """ |
---|
14 | ptl = context.REQUEST.get('PATH_TRANSLATED').split('/') |
---|
15 | try: |
---|
16 | id_index = ptl.index('students') |
---|
17 | except: |
---|
18 | return None |
---|
19 | if len(ptl) > id_index + 2: |
---|
20 | return ptl[id_index + 1] |
---|
21 | return None |
---|
Note: See
TracBrowser for help on using the repository browser.