Changeset 7915 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 19 Mar 2012, 04:21:47 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r7841 r7915 25 25 from waeup.kofa.interfaces import MessageFactory as _ 26 26 from waeup.kofa.schema import TextLineChoice 27 from waeup.kofa.university.vocabularies import CourseSource, StudyModeSource28 27 from waeup.kofa.students.vocabularies import ( 29 CertificateSource, StudyLevelSource, 30 contextual_reg_num_source, contextual_mat_num_source, 31 GenderSource, nats_vocab, 32 ) 28 StudyLevelSource, contextual_reg_num_source, contextual_mat_num_source, 29 GenderSource, nats_vocab, 30 ) 33 31 from waeup.kofa.payments.interfaces import IPaymentsContainer, IOnlinePayment 32 from waeup.kofa.university.vocabularies import ( 33 CourseSource, StudyModeSource, CertificateSource) 34 34 35 35 # VerdictSource can't be placed into the vocabularies module because it -
main/waeup.kofa/trunk/src/waeup/kofa/students/vocabularies.py
r7872 r7915 99 99 return title 100 100 101 class CertificateSource(BasicContextualSourceFactory):102 """A certificate source delivers all certificates provided103 in the portal.104 """105 def getValues(self, context):106 catalog = getUtility(ICatalog, name='certificates_catalog')107 return sorted(list(108 catalog.searchResults(109 code=('', 'z*'))),110 key=lambda value: value.code)111 112 def getToken(self, context, value):113 return value.code114 115 def getTitle(self, context, value):116 return "%s - %s" % (value.code, value.title[:64])117 118 119 101 class GenderSource(BasicSourceFactory): 120 102 """A gender source delivers basically a mapping
Note: See TracChangeset for help on using the changeset viewer.