## Script (Python) "getApplicantsStatistics" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id: getApplicantsStatistics.py 1277 2007-01-11 21:11:37Z joachim $ """ return Student Statistics """ import logging logger = logging.getLogger('Skins.getApplicantsStatistics') logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember()) if not context.isStaff(): return 'Not allowed' info = {} res_submitted_pce = context.applicants_catalog(status = 'submitted', screening_type = 'pce') res_not_admitted = context.applicants_catalog(status = 'not admitted') res_submitted_prence = context.applicants_catalog(status = 'submitted', screening_type = 'prence') res_admitted = context.applicants_catalog(status = 'admitted') res_created = context.applicants_catalog(status = 'created') info['submitted_pce'] = len(res_submitted_pce) info['admitted'] = len(res_admitted) info['not_admitted'] = len(res_not_admitted) info['submitted_prence'] = len(res_submitted_prence) info['created'] = len(res_created) return info