source: WAeUP_SRP/base/skins/waeup_student/getApplicantsStatistics.py @ 2841

Last change on this file since 2841 was 2835, checked in by Henrik Bettermann, 17 years ago

show cest statistics

File size: 1.3 KB
RevLine 
[2144]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 = {}
[2385]24res_submitted_pume = context.applicants_catalog(status = 'submitted', screening_type = 'pume')
[2835]25res_submitted_cest = context.applicants_catalog(status = 'submitted', screening_type = 'cest')
[2685]26res_not_admitted = context.applicants_catalog(status = 'not admitted')
[2385]27res_submitted_pde = context.applicants_catalog(status = 'submitted', screening_type = 'pde')
[2685]28res_admitted = context.applicants_catalog(status = 'admitted')
29res_created = context.applicants_catalog(status = 'created')
[2144]30
[2385]31info['submitted_pume'] = len(res_submitted_pume)
[2835]32info['submitted_cest'] = len(res_submitted_cest)
[2685]33info['admitted'] = len(res_admitted)
[2686]34info['not_admitted'] = len(res_not_admitted)
[2385]35info['submitted_pde'] = len(res_submitted_pde)
[2685]36info['created'] = len(res_created)
[2144]37
38return info
39
40
41
Note: See TracBrowser for help on using the repository browser.