Last change
on this file since 1100 was
1099,
checked in by Henrik Bettermann, 18 years ago
|
objection_raised added
|
-
Property svn:keywords set to
Id
|
File size:
941 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 1099 2006-12-20 07:10:58Z henrik $ |
---|
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 | dep['objection_raised'] = len(aq_portal(Eq('review_state','objection_raised'))) |
---|
30 | l.append(dep) |
---|
31 | return l |
---|
32 | |
---|
33 | |
---|
Note: See
TracBrowser for help on using the repository browser.