Changeset 7915 for main/waeup.kofa/trunk
- Timestamp:
- 19 Mar 2012, 04:21:47 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r7903 r7915 34 34 from waeup.kofa.schoolgrades import ResultEntryField 35 35 from waeup.kofa.students.vocabularies import ( 36 lgas_vocab, CertificateSource,GenderSource)36 lgas_vocab, GenderSource) 37 37 from waeup.kofa.university.vocabularies import ( 38 course_levels, AppCatSource )38 course_levels, AppCatSource, CertificateSource) 39 39 40 40 #: Maximum upload size for applicant passport photographs (in bytes) -
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 -
main/waeup.kofa/trunk/src/waeup/kofa/university/vocabularies.py
r7841 r7915 121 121 def getTitle(self, value): 122 122 return "%s - %s" % (value.code, value.title[:64]) 123 124 class CertificateSource(BasicContextualSourceFactory): 125 """A certificate source delivers all certificates provided 126 in the portal. 127 """ 128 def getValues(self, context): 129 catalog = getUtility(ICatalog, name='certificates_catalog') 130 return sorted(list( 131 catalog.searchResults( 132 code=('', 'z*'))), 133 key=lambda value: value.code) 134 135 def getToken(self, context, value): 136 return value.code 137 138 def getTitle(self, context, value): 139 return "%s - %s" % (value.code, value.title[:64])
Note: See TracChangeset for help on using the changeset viewer.