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