source: WAeUP_SRP/trunk/skins/waeup_student/getStudentName.py @ 1113

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

files for custom

  • Property svn:keywords set to Id
File size: 628 bytes
Line 
1## Script (Python) "getStudentInfo"
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: getStudentName.py 1077 2006-12-18 19:44:57Z joachim $
11"""
12return Info about the current Student
13"""
14mtool = context.portal_membership
15member = mtool.getAuthenticatedMember()
16if mtool.isAnonymousUser():
17    return None
18info = {}
19#from Products.zdb import set_trace
20#set_trace()
21if context.isStaff():
22    return member.getProperty('fullname',None)
23if not context.isStudent():
24    return None
25res = context.students_catalog(id = str(member))
26if len(res) != 1:
27    return None
28return res[0].name
Note: See TracBrowser for help on using the repository browser.