## Script (Python) "cpsdocument_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=student=None ##title= ## # $Id: isStudent.py 805 2006-11-09 09:38:29Z joachim $ """ return True if the member is considered a Student """ request = context.REQUEST wf = context.portal_workflow mtool = context.portal_membership member = mtool.getAuthenticatedMember() path_info = request.get('PATH_INFO').split('/') #roles = member.getRolesInContext(context) roles = member.getRoles() # Student role is global isStudent = "Student" in roles return isStudent