source: WAeUP_SRP/trunk/skins/waeup_student/getStudentReviewState.py @ 1863

Last change on this file since 1863 was 1845, checked in by joachim, 17 years ago

modifications to use QueueCatalog?

  • Property svn:keywords set to Id
File size: 614 bytes
RevLine 
[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
[1700]7##parameters=student_id=None
[1067]8##title=
9##
10# $Id: getStudentReviewState.py 1845 2007-06-02 11:01:49Z joachim $
11"""
[1490]12return the review_state of the Student
[1067]13"""
[1845]14from Products.AdvancedQuery import Eq, Between, Le,In
[1415]15try:
[1490]16    aq_portal = context.portal_catalog.evalAdvancedQuery
[1415]17except:
[1845]18    aq_portal = context.portal_catalog_real.evalAdvancedQuery
[1700]19if student_id is None:
20    student_id = context.getStudentId()
[1415]21query = Eq('id',student_id)
[1490]22res = aq_portal(query)
23if not res:
[1067]24    return None
[1490]25return res[0].review_state
Note: See TracBrowser for help on using the repository browser.