Changeset 12955 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 16 May 2015, 09:21:45 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r12932 r12955 73 73 from waeup.kofa.students.catalog import StudentQueryResultItem 74 74 from waeup.kofa.students.interfaces import IStudentsUtils 75 from waeup.kofa.students.vocabularies import StudyLevelSource 75 from waeup.kofa.students.vocabularies import StudyLevelSource, GenderSource 76 76 77 77 FORBIDDEN_CHARACTERS = (160,) … … 511 511 return 512 512 513 def _set_levels(self): 513 def _set_course_levels(self): 514 vocab_terms = course_levels.by_value.values() 515 self.course_levels = sorted([(x.token, x.title,) for x in vocab_terms]) 516 return 517 518 def _set_study_levels(self): 514 519 studylevelsource = StudyLevelSource().factory 515 self. levels = []520 self.study_levels = [] 516 521 for code in studylevelsource.getValues(None): 517 522 title = studylevelsource.getTitle(None, code) 518 self. levels.append((code, title))523 self.study_levels.append((code, title)) 519 524 return 520 525 … … 553 558 return 554 559 560 def _set_sex(self): 561 gendersource = GenderSource().factory 562 self.sex = [] 563 for sex in gendersource.getValues(): 564 title = gendersource.getTitle(sex) 565 self.sex.append((sex, title)) 566 return 567 555 568 def update(self): 556 569 self._set_inst_types() 557 570 self._set_sessions() 558 self._set_levels() 571 self._set_course_levels() 572 self._set_study_levels() 559 573 self._set_study_modes() 560 574 self._set_student_states() … … 564 578 self._set_app_cats() 565 579 self._set_payment_cats() 580 self._set_sex() 566 581 567 582 class AdministrationPage(KofaPage): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r12954 r12955 844 844 845 845 class InstTypesSource(grok.Viewlet): 846 """Ava lable institution types for the sources overview page.846 """Available institution types for the sources overview page. 847 847 """ 848 848 grok.order(1) … … 871 871 872 872 class SessionSource(InstTypesSource): 873 """Ava lable sessions for the sources overview page.873 """Available sessions for the sources overview page. 874 874 """ 875 875 grok.order(2) … … 878 878 title = _('Academic Sessions') 879 879 880 class CourseLevelSource(InstTypesSource): 881 """Available course levels for the sources overview page. 882 """ 883 grok.order(3) 884 name = 'CourseLevels' 885 source_name = 'course_levels' 886 title = _('Course Levels') 887 880 888 class StudyLevelSource(InstTypesSource): 881 """Ava lable study levels for the sources overview page.882 """ 883 grok.order( 3)884 name = ' Levels'885 source_name = ' levels'889 """Available study levels for the sources overview page. 890 """ 891 grok.order(4) 892 name = 'StudyLevels' 893 source_name = 'study_levels' 886 894 title = _('Study Levels') 887 895 888 896 class StudyModeSource(InstTypesSource): 889 """Ava lable study modes for the sources overview page.890 """ 891 grok.order( 4)897 """Available study modes for the sources overview page. 898 """ 899 grok.order(5) 892 900 name = 'StudyModes' 893 901 source_name = 'study_modes' … … 895 903 896 904 class AppCatsSource(InstTypesSource): 897 """Ava lable application categories for the sources overview page.905 """Available application categories for the sources overview page. 898 906 """ 899 907 grok.order(5) … … 902 910 title = _('Application Categories') 903 911 912 class PaymentCatsSource(InstTypesSource): 913 """Available payment categories for the sources overview page. 914 """ 915 grok.order(6) 916 name = 'PaymentCats' 917 source_name = 'payment_cats' 918 title = _('Payment Categories') 919 904 920 class StudentStatesSource(InstTypesSource): 905 """Ava lable student sates for the sources overview page.921 """Available student sates for the sources overview page. 906 922 """ 907 923 grok.order(1) … … 913 929 914 930 class VerdictsSource(InstTypesSource): 915 """Ava lable verdicts for the sources overview page.931 """Available verdicts for the sources overview page. 916 932 """ 917 933 grok.order(2) … … 922 938 title = _('Verdicts') 923 939 924 class PaymentCatsSource(InstTypesSource):925 """Avalable payment categories for the sources overview page.926 """927 grok.order(3)928 grok.viewletmanager(SourcesRight)929 column = 'right'930 name = 'PaymentCats'931 source_name = 'payment_cats'932 title = _('Payment Categories')933 934 940 class ExamSubjectsSource(InstTypesSource): 935 """Ava lable exam subjects for the sources overview page.941 """Available exam subjects for the sources overview page. 936 942 """ 937 943 grok.order(4) … … 943 949 944 950 class ExamGradesSource(InstTypesSource): 945 """Ava lable exam grades for the sources overview page.951 """Available exam grades for the sources overview page. 946 952 """ 947 953 grok.order(5) … … 952 958 title = _('Exam Grades') 953 959 960 class SexSource(InstTypesSource): 961 """Available sex values for the sources overview page. 962 """ 963 grok.order(6) 964 grok.viewletmanager(SourcesRight) 965 column = 'right' 966 name = 'Sex' 967 source_name = 'sex' 968 title = _('Sex') 969
Note: See TracChangeset for help on using the changeset viewer.