## Script (Python) "getStudentReviewState" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=student_id=None ##title= ## # $Id: getStudentReviewState.py 1700 2007-04-23 21:16:34Z joachim $ """ return the review_state of the Student """ try: from Products.AdvancedQuery import Eq, Between, Le,In aq_portal = context.portal_catalog.evalAdvancedQuery except: aq_portal = None if student_id is None: student_id = context.getStudentId() query = Eq('id',student_id) res = aq_portal(query) if not res: return None return res[0].review_state