Changeset 10184
- Timestamp:
- 22 May 2013, 06:44:00 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r10098 r10184 91 91 92 92 def getValues(self, context): 93 # appliction category not available when certificate was deleted.94 # shouldn't that info be part of applicant info instead?95 # when we cannot determine the appcat, we will display all courses.96 93 appcat = getattr(getattr(context, '__parent__', None), 97 94 'application_category', None) … … 99 96 result = catalog.searchResults( 100 97 application_category=(appcat,appcat)) 101 result = sorted(result, key=lambda value: value.code)102 # XXX: What does the following mean here?98 result = getUtility( 99 IApplicantsUtils).filterCertificates(result) 103 100 curr_course = context.course1 104 101 if curr_course is not None and curr_course not in result: 105 # display also current course even if it is not catalogued 106 # (any more) 102 # display also current course even if certificate has been removed 107 103 result = [curr_course,] + result 108 104 return result … … 153 149 """ 154 150 155 APP_TYPES_DICT = Attribute(' dict of application types') 151 APP_TYPES_DICT = Attribute('dict of application types') 152 153 def setPaymentDetails(container, payment): 154 """Set the payment data of an applicant. 155 """ 156 157 def getApplicantsStatistics(container): 158 """Count applicants in containers. 159 """ 160 161 def filterCertificates(resultset): 162 """Filter and sort certificates for AppCatCertificateSource. 163 """ 156 164 157 165 class IApplicantsRoot(IKofaObject, IContainer): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
r9047 r10184 63 63 64 64 def getApplicantsStatistics(self, container): 65 """Count applicants in containers. 66 """ 65 67 state_stats = {INITIALIZED:0, STARTED:0, PAID:0, SUBMITTED:0, 66 68 ADMITTED:0, NOT_ADMITTED:0, CREATED:0} … … 75 77 applicant_id=(code, mxcode))) 76 78 return state_stats, None 79 80 def filterCertificates(self, resultset): 81 """Filter and sort certificates for AppCatCertificateSource. 82 """ 83 return sorted(resultset, key=lambda value: value.code)
Note: See TracChangeset for help on using the changeset viewer.