source: WAeUP_SRP/trunk/skins/waeup_default/getReviewInfo.py @ 1838

Last change on this file since 1838 was 1819, checked in by Henrik Bettermann, 17 years ago

ticket #223 (in custom)

  • Property svn:keywords set to Id
File size: 896 bytes
RevLine 
[1191]1## Script (Python) "getReviewInfo"
[1187]2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=student=None, with_items=None
8##title=
9##
10# $Id: getReviewInfo.py 1819 2007-05-24 13:28:31Z henrik $
11"""
12return Info about the current Student
13"""
14ptool = context.portal_proxies
15wf_vars = ['review_state']
[1819]16try:
17    docid = context.getDocid()
18except:
19    return ''
[1187]20if docid:
21    proxies_info = ptool.getProxyInfosFromDocid(docid,
22                                                workflow_vars=wf_vars)
23    d_review = proxies_info[0]['review_state']
[1191]24else:
25    d_review = ''
[1187]26if context.portal_type != "Student":
27    student_id = context.getStudentId()
[1355]28    if student_id:
29        res = context.portal_catalog(id = student_id,portal_type='Student')
30        if res:
31            s_review = res[-1].review_state
32            return "%s / %s" % (s_review,d_review)
[1187]33return "%s" % (d_review)
34
Note: See TracBrowser for help on using the repository browser.