- Timestamp:
- 7 Jun 2012, 18:37:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
r8561 r8647 22 22 import sys 23 23 import grok 24 from zope.catalog.interfaces import ICatalog 24 25 from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError 25 26 from waeup.kofa.applicants.utils import ApplicantsUtils 27 from waeup.kofa.applicants.interfaces import IApplicantsUtils 28 from waeup.kofa.applicants.workflow import (INITIALIZED, 29 STARTED, PAID, ADMITTED, NOT_ADMITTED, SUBMITTED, CREATED) 26 30 from waeup.uniben.interfaces import MessageFactory as _ 31 27 32 28 33 … … 58 63 'form.presently_inst': _(u'Presently attending a course or programme'), 59 64 } 65 66 # Temporarily disabled 67 def xxx_getApplicantsStatistics(self, container): 68 state_stats = {INITIALIZED:0, STARTED:0, PAID:0, SUBMITTED:0, 69 ADMITTED:0, NOT_ADMITTED:0, CREATED:0} 70 faculty_keys = grok.getSite()['faculties'].keys() 71 fac_stats = dict([(i,0) for i in faculty_keys]) 72 for key in container.keys(): 73 state = container[key].state 74 state_stats[state] += 1 75 cert = getattr(container[key],'course1',None) 76 if cert is not None and state == SUBMITTED: 77 faculty = cert.__parent__.__parent__.__parent__ 78 fac_stats[faculty.__name__] += 1 79 return state_stats, fac_stats
Note: See TracChangeset for help on using the changeset viewer.