Changeset 10208
- Timestamp:
- 23 May 2013, 05:39:45 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r10187 r10208 96 96 result = catalog.searchResults( 97 97 application_category=(appcat,appcat)) 98 result = getUtility(98 resultlist = getUtility( 99 99 IApplicantsUtils).filterCertificates(context, result) 100 curr_course = context.course1 101 if curr_course is not None and curr_course not in result: 102 # display also current course even if certificate has been removed 103 result = [curr_course,] + result 104 return result 100 return resultlist 105 101 106 102 def getTitle(self, context, value): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_interfaces.py
r7872 r10208 22 22 from zc.sourcefactory.browser.source import FactoredTerms 23 23 from zope.publisher.browser import TestRequest 24 from waeup.kofa.applicants.interfaces import ApplicationTypeSource25 24 from waeup.kofa.students.vocabularies import GenderSource 26 25 -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
r10187 r10208 81 81 """Filter and sort certificates in AppCatCertificateSource. 82 82 """ 83 return sorted(resultset, key=lambda value: value.code) 83 resultlist = sorted(resultset, key=lambda value: value.code) 84 curr_course = context.course1 85 if curr_course is not None and curr_course not in resultlist: 86 # display also current course even if certificate has been removed 87 resultlist = [curr_course,] + resultlist 88 return resultlist 84 89 85 90 def getCertTitle(self, context, value):
Note: See TracChangeset for help on using the changeset viewer.