## 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 1191 2007-01-03 19:55:57Z joachim $
"""
return Info about the current Student
"""
ptool = context.portal_proxies
wf_vars = ['review_state']
docid = context.getDocid()
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()
    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)

