## 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 1870 2007-06-08 16:13:05Z joachim $ """ return the review_state of the Student """ try: from Products.zdb import set_trace except: def set_trace(): pass # from Products.AdvancedQuery import Eq, Between, Le,In # try: # aq_portal = context.portal_catalog.evalAdvancedQuery # except: # aq_portal = context.portal_catalog_real.evalAdvancedQuery if student_id is None: student_id = context.getStudentId() #query = Eq('id',student_id) #res = aq_portal(query) res = context.students_catalog(id = student_id) if not res: return None return res[0].review_state