## 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 1870 2007-06-08 16:13:05Z joachim $
"""
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":
    s_review = context.getStudentReviewState()
    if s_review:
        return "%s / %s" % (s_review,d_review)
    # student_id = context.getStudentId()
    # if student_id:
    #     res = context.portal_catalog(id = student_id,portal_type='Student')
    #     if res:
    #         return "%s / %s" % (s_review,d_review)
return "%s" % (d_review)

