- Timestamp:
- 31 May 2013, 17:48:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r10262 r10266 166 166 return True 167 167 168 def level_dict(studycourse): 169 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 170 level_dict = {} 171 studylevelsource = StudyLevelSource().factory 172 for code in studylevelsource.getValues(studycourse): 173 title = translate(studylevelsource.getTitle(studycourse, code), 174 'waeup.kofa', target_language=portal_language) 175 level_dict[code] = title 176 return level_dict 177 168 178 class StudentsBreadcrumb(Breadcrumb): 169 179 """A breadcrumb for the students container. … … 991 1001 992 1002 @property 993 def level_dict (self):1003 def level_dicts(self): 994 1004 studylevelsource = StudyLevelSource().factory 995 1005 for code in studylevelsource.getValues(self.context): … … 998 1008 999 1009 @property 1000 def session_dict (self):1010 def session_dicts(self): 1001 1011 yield(dict(code='', title='--')) 1002 1012 for item in academic_sessions(): … … 1058 1068 1059 1069 def update(self): 1070 if not self.context.student.transcript_enabled: 1071 self.flash(_('You are not allowed to view the transcript.')) 1072 self.redirect(self.url(self.context)) 1073 return 1060 1074 super(StudyCourseTranscriptPage, self).update() 1061 1075 self.semester_dict = getUtility(IKofaUtils).SEMESTER_DICT 1076 self.level_dict = level_dict(self.context) 1062 1077 self.session_dict = dict( 1063 1078 [(item[1], item[0]) for item in academic_sessions()]) 1064 self.course_levels = course_levels1065 1079 self.studymode_dict = getUtility(IKofaUtils).STUDY_MODES_DICT 1066 1080 return … … 1087 1101 1088 1102 def update(self): 1103 if not self.context.student.transcript_enabled: 1104 self.flash(_('You are not allowed to download the transcript.')) 1105 self.redirect(self.url(self.context)) 1106 return 1089 1107 super(ExportPDFTranscriptPage, self).update() 1090 1108 self.semester_dict = getUtility(IKofaUtils).SEMESTER_DICT 1109 self.level_dict = level_dict(self.context) 1091 1110 self.session_dict = dict( 1092 1111 [(item[1], item[0]) for item in academic_sessions()]) 1093 self.course_levels = course_levels1094 1112 self.studymode_dict = getUtility(IKofaUtils).STUDY_MODES_DICT 1095 1113 return
Note: See TracChangeset for help on using the changeset viewer.