source: WAeUP_SRP/trunk/skins/waeup_statistics/getApplicantsStatistics.py @ 15032

Last change on this file since 15032 was 5511, checked in by Henrik Bettermann, 14 years ago

second choice pde application - part2

File size: 1.8 KB
RevLine 
[3709]1## Script (Python) "getApplicantsStatistics"
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: getApplicantsStatistics.py 1277 2007-01-11 21:11:37Z joachim $
11"""
12return Student Statistics
13"""
14
15import logging
16logger = logging.getLogger('Skins.getApplicantsStatistics')
17
18logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
19if not context.isStaff():
20    return 'Not allowed'
21
22
23info = {}
24res_submitted_pume = context.applicants_catalog(status = 'submitted', screening_type = 'pume')
[5259]25res_submitted_pume2 = context.applicants_catalog(status = 'submitted', screening_type = 'pume2')
[3709]26res_submitted_cest = context.applicants_catalog(status = 'submitted', screening_type = 'cest')
27res_submitted_sandwich = context.applicants_catalog(status = 'submitted', screening_type = 'sandwich')
[5187]28res_submitted_dp = context.applicants_catalog(status = 'submitted', screening_type = 'dp')
[3709]29res_not_admitted = context.applicants_catalog(status = 'not admitted')
30res_submitted_pde = context.applicants_catalog(status = 'submitted', screening_type = 'pde')
[5511]31res_submitted_pde2 = context.applicants_catalog(status = 'submitted', screening_type = 'pde2')
[3709]32res_admitted = context.applicants_catalog(status = 'admitted')
33res_created = context.applicants_catalog(status = 'created')
34
35info['submitted_pume'] = len(res_submitted_pume)
[5259]36info['submitted_pume2'] = len(res_submitted_pume2)
[3709]37info['submitted_cest'] = len(res_submitted_cest)
38info['submitted_sandwich'] = len(res_submitted_sandwich)
[5187]39info['submitted_dp'] = len(res_submitted_dp)
[3709]40info['admitted'] = len(res_admitted)
41info['not_admitted'] = len(res_not_admitted)
42info['submitted_pde'] = len(res_submitted_pde)
[5511]43info['submitted_pde2'] = len(res_submitted_pde2)
[3709]44info['created'] = len(res_created)
45
46return info
47
48
49
Note: See TracBrowser for help on using the repository browser.