## Script (Python) "getReviewInfo" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=student=None, with_items=None ##title= ## # $Id: getReviewInfo.py 1819 2007-05-24 13:28:31Z henrik $ """ return Info about the current Student """ ptool = context.portal_proxies wf_vars = ['review_state'] try: docid = context.getDocid() except: return '' if docid: proxies_info = ptool.getProxyInfosFromDocid(docid, workflow_vars=wf_vars) d_review = proxies_info[0]['review_state'] else: d_review = '' if context.portal_type != "Student": student_id = context.getStudentId() if student_id: res = context.portal_catalog(id = student_id,portal_type='Student') if res: s_review = res[-1].review_state return "%s / %s" % (s_review,d_review) return "%s" % (d_review)