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

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

replace calls to isStudent by inline statements, please test.

File size: 624 bytes
Line 
1## Script (Python) "isCourseAdviser"
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: isClearanceOfficer.py 1087 2006-12-18 22:13:31Z joachim $
11member = context.portal_membership.getAuthenticatedMember()
12member_id = str(member)
13for c in member_id:
14    is_student = True
15    if c not in ('0123456789'):
16        is_student = False
17        break
18if is_student and len(member_id) == 7:
19    return False
20# if context.isStudent():
21#     return False
22roles = member.getRolesInContext(context)
23return "CourseAdviser" in roles
24
Note: See TracBrowser for help on using the repository browser.