## 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_pume = context.applicants_catalog(status = 'submitted', screening_type = 'pume') res_submitted_cest = context.applicants_catalog(status = 'submitted', screening_type = 'cest') res_submitted_sandwich = context.applicants_catalog(status = 'submitted', screening_type = 'sandwich') res_submitted_dp = context.applicants_catalog(status = 'submitted', screening_type = 'dp') res_not_admitted = context.applicants_catalog(status = 'not admitted') res_submitted_pde = context.applicants_catalog(status = 'submitted', screening_type = 'pde') res_admitted = context.applicants_catalog(status = 'admitted') res_created = context.applicants_catalog(status = 'created') info['submitted_pume'] = len(res_submitted_pume) info['submitted_cest'] = len(res_submitted_cest) info['submitted_sandwich'] = len(res_submitted_sandwich) info['submitted_dp'] = len(res_submitted_dp) info['admitted'] = len(res_admitted) info['not_admitted'] = len(res_not_admitted) info['submitted_pde'] = len(res_submitted_pde) info['created'] = len(res_created) return info