Changeset 17027
- Timestamp:
- 18 Jul 2022, 08:18:27 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser.py
r17025 r17027 153 153 [_('Faculty Officer\'s Signature')], 154 154 [_('Student\'s Signature')]) 155 156 def render(self): 157 if not self.context.student.current_mode: 158 self.flash('No certificate assigned.', type="danger") 159 self.redirect(self.url(self.context)) 160 return 161 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 162 Sem = translate(_('Term'), target_language=portal_language) 163 Code = translate(_('Code'), target_language=portal_language) 164 Title = translate(_('Title'), target_language=portal_language) 165 Cred = translate(_('Cred.'), target_language=portal_language) 166 CC = translate(_('Cat.'), target_language=portal_language) 167 TotalScore = translate(_('Total Score'), target_language=portal_language) 168 #CA = translate(_('CA'), target_language=portal_language) 169 Grade = translate(_('Grade'), target_language=portal_language) 170 Signature = translate(_('Lecturer\'s Signature'), 'waeup.aaue', 171 target_language=portal_language) 172 studentview = StudentBasePDFFormPage(self.context.student, 173 self.request, self.omit_fields) 174 students_utils = getUtility(IStudentsUtils) 175 tabledata = [] 176 tableheader = [] 177 contenttitle = [] 178 for i in range(1,7): 179 tabledata.append(sorted( 180 [value for value in self.context.values() 181 if value.semester == i and not value.outstanding], 182 key=lambda value: str(value.semester) + value.code)) 183 tableheader.append([(Code,'code', 2.0), 184 (Title,'title', 7), 185 (Cred, 'credits', 1.4), 186 #(CC, 'course_category', 1.2), 187 (TotalScore, 'total_score', 1.4), 188 #(CA, 'ca', 1.4), 189 (Grade, 'grade', 1.4), 190 (Signature, 'dummy', 3), 191 ]) 192 return students_utils.renderPDF( 193 self, 'course_registration_slip.pdf', 194 self.context.student, studentview, 195 tableheader=tableheader, 196 tabledata=tabledata, 197 omit_fields=self.omit_fields, 198 signatures=self._signatures(), 199 sigs_in_footer=self._sigsInFooter(), 200 ) 155 201 156 202 class CustomCourseTicketDisplayFormPage(CourseTicketDisplayFormPage):
Note: See TracChangeset for help on using the changeset viewer.