## Script (Python) "getStudentReviewState" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id: getStudentReviewState.py 1490 2007-02-25 00:32:45Z 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 student_id = context.getStudentId() query = Eq('id',student_id) res = aq_portal(query) if not res: return None return res[0].review_state