[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 | """ |
---|
| 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 = {} |
---|
[2385] | 24 | #res_entered = context.applicants_catalog(status = 'entered') |
---|
| 25 | #res_edited = context.applicants_catalog(status = 'edited') |
---|
| 26 | #res_submitted = context.applicants_catalog(status = 'submitted') |
---|
| 27 | res_submitted_pume = context.applicants_catalog(status = 'submitted', screening_type = 'pume') |
---|
[2528] | 28 | res_admitted_pume = context.applicants_catalog(status = 'admitted', screening_type = 'pume') |
---|
| 29 | res_not_admitted_pume = context.applicants_catalog(status = 'not admitted', screening_type = 'pume') |
---|
[2385] | 30 | res_submitted_pde = context.applicants_catalog(status = 'submitted', screening_type = 'pde') |
---|
| 31 | #info['entered'] = len(res_entered) |
---|
| 32 | #info['edited'] = len(res_edited) |
---|
| 33 | #info['submitted'] = len(res_submitted) |
---|
| 34 | #info['pin_entered'] = info['entered'] + info['submitted'] + info['edited'] |
---|
[2144] | 35 | |
---|
[2385] | 36 | info['submitted_pume'] = len(res_submitted_pume) |
---|
[2528] | 37 | info['admitted_pume'] = len(res_admitted_pume) |
---|
| 38 | info['not_admitted_pume'] = len(res_not_admitted_pume) |
---|
[2385] | 39 | info['submitted_pde'] = len(res_submitted_pde) |
---|
[2144] | 40 | |
---|
| 41 | return info |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | |
---|