Last change
on this file since 1724 was
1355,
checked in by Henrik Bettermann, 18 years ago
|
simulate callback disabled
performance of getReviewInfo improved
|
-
Property svn:keywords set to
Id
|
File size:
865 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 1355 2007-01-25 20:49:22Z henrik $ |
---|
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 | if student_id: |
---|
26 | res = context.portal_catalog(id = student_id,portal_type='Student') |
---|
27 | if res: |
---|
28 | s_review = res[-1].review_state |
---|
29 | return "%s / %s" % (s_review,d_review) |
---|
30 | return "%s" % (d_review) |
---|
31 | |
---|
Note: See
TracBrowser for help on using the repository browser.