Changeset 13617
- Timestamp:
- 15 Jan 2016, 15:34:03 (9 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r13613 r13617 5 5 ======================= 6 6 7 * (No changes yet)7 * Add DegreeSource and degree field to Certificate. Plugins must be updated! 8 8 9 9 -
main/waeup.kofa/trunk/src/waeup/kofa/app.py
r13214 r13617 81 81 """Lookup all plugins and call their `update()` method. 82 82 """ 83 # XXX: TBD: Remove update() in all plugins but documents and users84 83 getUtility(IKofaPluggable, name='documents').update( 85 84 self, 'documents', self.logger) … … 88 87 getUtility(IKofaPluggable, name='applicants').update( 89 88 self, 'applicants', self.logger) 89 getUtility(IKofaPluggable, name='certificates').update( 90 self, 'certificates', self.logger) 90 91 return 91 92 attrs_to_fields(University) -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r13608 r13617 580 580 def _set_inst_types(self): 581 581 study_modes = getUtility(IKofaUtils).INST_TYPES_DICT 582 self.inst_types = s tudy_modes.items()582 self.inst_types = sorted(study_modes.items()) 583 583 return 584 584 … … 603 603 def _set_study_modes(self): 604 604 study_modes = getUtility(IKofaUtils).STUDY_MODES_DICT 605 self.study_modes = study_modes.items() 605 self.study_modes = sorted(study_modes.items()) 606 return 607 608 def _set_degrees(self): 609 degrees = getUtility(IKofaUtils).DEGREES_DICT 610 self.degrees = sorted(degrees.items()) 606 611 return 607 612 … … 613 618 def _set_verdicts(self): 614 619 verdicts = getUtility(IKofaUtils).VERDICTS_DICT 615 self.verdicts = verdicts.items()620 self.verdicts = sorted(verdicts.items()) 616 621 return 617 622 … … 660 665 self._set_study_levels() 661 666 self._set_study_modes() 667 self._set_degrees() 662 668 self._set_student_states() 663 669 self._set_verdicts() -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r13434 r13617 925 925 title = _('Study Modes') 926 926 927 class DegreeSource(InstTypesSource): 928 """Available study modes for the sources overview page. 929 """ 930 grok.order(6) 931 name = 'Degrees' 932 source_name = 'degrees' 933 title = _('Degrees') 934 927 935 class PaymentCatsSource(InstTypesSource): 928 936 """Available payment categories for the sources overview page. 929 937 """ 930 grok.order( 6)938 grok.order(7) 931 939 name = 'PaymentCats' 932 940 source_name = 'payment_cats' … … 936 944 """Available application types for the sources overview page. 937 945 """ 938 grok.order( 7)946 grok.order(8) 939 947 name = 'AppTypes' 940 948 source_name = 'app_types' … … 944 952 """Available application categories for the sources overview page. 945 953 """ 946 grok.order( 8)954 grok.order(9) 947 955 name = 'AppCats' 948 956 source_name = 'app_cats' -
main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py
r12620 r13617 59 59 school_fee_1=None, school_fee_2=None, 60 60 school_fee_3=None, school_fee_4=None, 61 ratio=None, 61 ratio=None, degree=None, 62 62 custom_textline_1=None, custom_textline_2=None, 63 63 custom_float_1=None, custom_float_2=None): … … 74 74 self.school_fee_4 = school_fee_4 75 75 self.ratio = ratio 76 self.degree = degree 76 77 self.custom_textline_1 = custom_textline_1 77 78 self.custom_textline_2 = custom_textline_2 -
main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py
r13399 r13617 30 30 InstTypeSource, 31 31 SemesterSource, 32 DegreeSource, 32 33 ) 33 34 … … 173 174 default = u'ug_ft', 174 175 required = True, 176 ) 177 178 degree = schema.Choice( 179 title = _(u'Degree'), 180 source = DegreeSource(), 181 required = False, 175 182 ) 176 183 -
main/waeup.kofa/trunk/src/waeup/kofa/university/vocabularies.py
r12862 r13617 68 68 DICT_NAME = 'STUDY_MODES_DICT' 69 69 70 class DegreeSource(ContextualDictSourceFactoryBase): 71 """A source for certificate degrees 72 """ 73 #: name of dict to deliver from kofa utils. 74 DICT_NAME = 'DEGREES_DICT' 75 76 def getTitle(self, context, value): 77 utils = getUtility(IKofaUtils) 78 return "%s (%s)" % (getattr(utils, self.DICT_NAME)[value], value) 79 70 80 class CourseSource(BasicSourceFactory): 71 81 """A course source delivers all courses inside the portal by looking -
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r13492 r13617 29 29 from waeup.kofa.smtp import send_mail as send_mail_internally 30 30 from waeup.kofa.utils.helpers import get_sorted_preferred 31 from waeup.kofa.utils.degrees import DEGREES_DICT 31 32 32 33 … … 87 88 #: (e.g. object histories) pdf slips. 88 89 PORTAL_LANGUAGE = 'en' 90 91 DEGREES_DICT = DEGREES_DICT 89 92 90 93 PREFERRED_LANGUAGES_DICT = {
Note: See TracChangeset for help on using the changeset viewer.