Last change
on this file since 1094 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
|
Line | |
---|
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 | """ |
---|
12 | return Student Statistic |
---|
13 | """ |
---|
14 | try: |
---|
15 | from Products.AdvancedQuery import Eq, Between, Le,In |
---|
16 | aq_portal = context.portal_catalog.evalAdvancedQuery |
---|
17 | aq_students = context.students_catalog.evalAdvancedQuery |
---|
18 | except: |
---|
19 | evalAdvancedQuery = None |
---|
20 | l = [] |
---|
21 | if not context.isStaff(): |
---|
22 | return l |
---|
23 | dep = {} |
---|
24 | dep['id'] = "All" |
---|
25 | dep['students'] = len(context.students_catalog()) |
---|
26 | dep['clearance_pin_entered'] = len(aq_portal(Eq('review_state','clearance_pin_entered'))) |
---|
27 | dep['clearance_requested'] = len(aq_portal(Eq('review_state','clearance_requested'))) |
---|
28 | dep['cleared_and_validated'] = len(aq_portal(Eq('review_state','cleared_and_validated'))) |
---|
29 | l.append(dep) |
---|
30 | return l |
---|
31 | |
---|
Note: See
TracBrowser for help on using the repository browser.