source: WAeUP_SRP/trunk/skins/waeup_default/isStudent.py @ 1957

Last change on this file since 1957 was 1957, checked in by joachim, 17 years ago

replace calls to isStudent by inline statements, please test.

  • Property svn:keywords set to Id
File size: 583 bytes
Line 
1## Script (Python) "isStudent"
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: isStudent.py 1957 2007-06-25 18:45:38Z joachim $
11
12member_id = str(context.portal_membership.getAuthenticatedMember())
13#from Products.zdb import set_trace;set_trace()
14# if len(member_id) != 7:
15#     return False
16# try:
17#     int(member_id[1:])
18#     return True
19# except:
20#     return False
21for c in member_id:
22    is_student = True
23    if c not in ('0123456789'):
24        is_student = False
25        break
26return is_student and len(member_id) == 7
Note: See TracBrowser for help on using the repository browser.