Last change
on this file since 2582 was
2548,
checked in by Henrik Bettermann, 17 years ago
|
application statistics customized (in custom)
|
File size:
834 bytes
|
Rev | Line | |
---|
[2548] | 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 | """ |
---|
| 12 | return Student Statistics |
---|
| 13 | """ |
---|
| 14 | |
---|
| 15 | import logging |
---|
| 16 | logger = logging.getLogger('Skins.getApplicantsStatistics') |
---|
| 17 | |
---|
| 18 | logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember()) |
---|
| 19 | if not context.isStaff(): |
---|
| 20 | return 'Not allowed' |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | info = {} |
---|
| 24 | |
---|
| 25 | res_submitted_pce = context.applicants_catalog(status = 'submitted', screening_type = 'pce') |
---|
| 26 | res_admitted_prence = context.applicants_catalog(status = 'submitted', screening_type = 'prence') |
---|
| 27 | |
---|
| 28 | info['submitted_pce'] = len(res_submitted_pce) |
---|
| 29 | info['admitted_prence'] = len(res_admitted_prence) |
---|
| 30 | |
---|
| 31 | return info |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | |
---|
Note: See
TracBrowser for help on using the repository browser.