- Timestamp:
- 1 Jun 2012, 11:25:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/container.py
r8563 r8591 99 99 @property 100 100 def statistics(self): 101 stat istics = {INITIALIZED:0, STARTED:0, PAID:0, SUBMITTED:0,101 state_stats = {INITIALIZED:0, STARTED:0, PAID:0, SUBMITTED:0, 102 102 ADMITTED:0, NOT_ADMITTED:0, CREATED:0} 103 faculty_keys = grok.getSite()['faculties'].keys() 104 fac_stats = dict([(i,0) for i in faculty_keys]) 103 105 for key in self.keys(): 104 statistics[self[key].state] += 1 105 return statistics 106 state_stats[self[key].state] += 1 107 cert = getattr(self[key],'course1',None) 108 if cert is not None: 109 faculty = cert.__parent__.__parent__.__parent__ 110 fac_stats[faculty.__name__] += 1 111 return state_stats, fac_stats 106 112 107 113 ApplicantsContainer = attrs_to_fields(ApplicantsContainer)
Note: See TracChangeset for help on using the changeset viewer.