## 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_entered = context.applicants_catalog(status = 'entered') #res_edited = context.applicants_catalog(status = 'edited') #res_submitted = context.applicants_catalog(status = 'submitted') res_submitted_pume = context.applicants_catalog(status = 'submitted', screening_type = 'pume') res_submitted_pde = context.applicants_catalog(status = 'submitted', screening_type = 'pde') #info['entered'] = len(res_entered) #info['edited'] = len(res_edited) #info['submitted'] = len(res_submitted) #info['pin_entered'] = info['entered'] + info['submitted'] + info['edited'] info['submitted_pume'] = len(res_submitted_pume) info['submitted_pde'] = len(res_submitted_pde) return info