Last change
on this file since 1489 was
1415,
checked in by joachim, 18 years ago
|
added new Function add_student
|
-
Property svn:keywords set to
Id
|
File size:
624 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 1415 2007-02-14 12:54:55Z joachim $ |
---|
| 11 | """ |
---|
| 12 | return Info about the current Student |
---|
| 13 | """ |
---|
[1415] | 14 | try: |
---|
| 15 | from Products.AdvancedQuery import Eq, Between, Le,In |
---|
| 16 | evalAQ = context.portal_catalog.evalAdvancedQuery |
---|
| 17 | except: |
---|
| 18 | evalAdvancedQuery = None |
---|
[1067] | 19 | student_id = context.getStudentId() |
---|
[1415] | 20 | #res = context.portal_catalog(id = student_id,portal_type='Student') |
---|
| 21 | query = Eq('id',student_id) |
---|
| 22 | res = evalAQ(query) |
---|
[1067] | 23 | if not res:# or len(res) > 1: |
---|
| 24 | return None |
---|
| 25 | return res[-1].review_state |
---|
Note: See
TracBrowser for help on using the repository browser.