source: WAeUP_SRP/trunk/skins/waeup_student/getStudentId.py @ 1070

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"""
12return StudentId from request
13"""
14ptl = context.REQUEST.get('PATH_TRANSLATED').split('/')
15try:
16    id_index = ptl.index('students')
17except:
18    return None
19if len(ptl) > id_index + 2:
20    return ptl[id_index + 1]
21return None
Note: See TracBrowser for help on using the repository browser.