## Script (Python) "getStudentReviewState" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id: getStudentReviewState.py 1415 2007-02-14 12:54:55Z joachim $ """ return Info about the current Student """ try: from Products.AdvancedQuery import Eq, Between, Le,In evalAQ = context.portal_catalog.evalAdvancedQuery except: evalAdvancedQuery = None student_id = context.getStudentId() #res = context.portal_catalog(id = student_id,portal_type='Student') query = Eq('id',student_id) res = evalAQ(query) if not res:# or len(res) > 1: return None return res[-1].review_state