Last change
on this file since 3567 was
1191,
checked in by joachim, 18 years ago
|
fix undefined d_review
|
-
Property svn:keywords set to
Id
|
File size:
830 bytes
|
Line | |
---|
1 | ## Script (Python) "getReviewInfo" |
---|
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 1191 2007-01-03 19:55:57Z joachim $ |
---|
11 | """ |
---|
12 | return Info about the current Student |
---|
13 | """ |
---|
14 | ptool = context.portal_proxies |
---|
15 | wf_vars = ['review_state'] |
---|
16 | docid = context.getDocid() |
---|
17 | if docid: |
---|
18 | proxies_info = ptool.getProxyInfosFromDocid(docid, |
---|
19 | workflow_vars=wf_vars) |
---|
20 | d_review = proxies_info[0]['review_state'] |
---|
21 | else: |
---|
22 | d_review = '' |
---|
23 | if context.portal_type != "Student": |
---|
24 | student_id = context.getStudentId() |
---|
25 | res = context.portal_catalog(id = student_id,portal_type='Student') |
---|
26 | if res: |
---|
27 | s_review = res[-1].review_state |
---|
28 | return "%s / %s" % (s_review,d_review) |
---|
29 | return "%s" % (d_review) |
---|
30 | |
---|
Note: See
TracBrowser for help on using the repository browser.