source: WAeUP_SRP/trunk/skins/waeup_student/getStudentStatistics.py @ 1089

Last change on this file since 1089 was 1081, checked in by joachim, 18 years ago

first version of statistic (already in custom)

  • Property svn:keywords set to Id
File size: 860 bytes
RevLine 
[1081]1## Script (Python) "getStudentStatistics"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9##
10# $Id: getStudentStatistics.py 1081 2006-12-18 20:56:42Z joachim $
11"""
12return Student Statistic
13"""
14try:
15    from Products.AdvancedQuery import Eq, Between, Le,In
16    aq_portal = context.portal_catalog.evalAdvancedQuery
17    aq_students = context.students_catalog.evalAdvancedQuery
18except:
19    evalAdvancedQuery = None
20l = []
21if not context.isStaff():
22    return l
23dep = {}
24dep['id'] = "All"
25dep['students'] = len(context.students_catalog())
26dep['clearance_pin_entered'] = len(aq_portal(Eq('review_state','clearance_pin_entered')))
27dep['clearance_requested'] = len(aq_portal(Eq('review_state','clearance_requested')))
28dep['cleared_and_validated'] = len(aq_portal(Eq('review_state','cleared_and_validated')))
29l.append(dep)
30return l
31
Note: See TracBrowser for help on using the repository browser.