Last change
on this file since 1494 was
1490,
checked in by joachim, 18 years ago
|
fix
|
-
Property svn:keywords set to
Id
|
File size:
535 bytes
|
Rev | Line | |
---|
[1161] | 1 | ## Script (Python) "getStudentReviewState" |
---|
[1067] | 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
[1415] | 7 | ##parameters= |
---|
[1067] | 8 | ##title= |
---|
| 9 | ## |
---|
| 10 | # $Id: getStudentReviewState.py 1490 2007-02-25 00:32:45Z joachim $ |
---|
| 11 | """ |
---|
[1490] | 12 | return the review_state of the Student |
---|
[1067] | 13 | """ |
---|
[1415] | 14 | try: |
---|
| 15 | from Products.AdvancedQuery import Eq, Between, Le,In |
---|
[1490] | 16 | aq_portal = context.portal_catalog.evalAdvancedQuery |
---|
[1415] | 17 | except: |
---|
[1490] | 18 | aq_portal = None |
---|
[1067] | 19 | student_id = context.getStudentId() |
---|
[1415] | 20 | query = Eq('id',student_id) |
---|
[1490] | 21 | res = aq_portal(query) |
---|
| 22 | if not res: |
---|
[1067] | 23 | return None |
---|
[1490] | 24 | return res[0].review_state |
---|
Note: See
TracBrowser for help on using the repository browser.