- Timestamp:
- 5 Feb 2020, 22:34:10 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/browser.py
r15985 r15989 206 206 form_fields = grok.AutoFields(ICustomStudentStudyLevel).omit('level') 207 207 208 class ExportPDFExaminationClearanceSlip(CustomExportPDFCourseRegistrationSlip): 209 """Deliver a PDF slip of the context. 210 """ 211 212 grok.name('examination_clearance_slip.pdf') 213 208 class ExportPDFExaminationClearanceSlip1(CustomExportPDFCourseRegistrationSlip): 209 """Deliver a PDF slip of the context. 210 """ 211 grok.name('examination_clearance_slip_1.pdf') 214 212 form_fields = None 215 216 213 omit_fields = ( 217 214 'password', 'suspended', 'phone', 'date_of_birth', … … 219 216 'adm_code', 'sex', 'suspended_comment', 220 217 'flash_notice') 221 222 @property 223 def label(self): 224 return '%s Examination Clearance' % self.context.level_session 218 semester = 1 219 tabletitle = ['', '', ''] 220 221 @property 222 def label(self): 223 return '%s First Semester Examination Clearance' % self.context.level_session 225 224 226 225 @property … … 234 233 self.redirect(self.url(self.context)) 235 234 236 @property237 def tabletitle(self):238 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE239 tabletitle = []240 tabletitle.append(translate(_('1st Semester Courses'), 'waeup.kofa',241 target_language=portal_language))242 tabletitle.append('_PB_' + translate(_('2nd Semester Courses'), 'waeup.kofa',243 target_language=portal_language))244 tabletitle.append(translate(_('Level Courses'), 'waeup.kofa',245 target_language=portal_language))246 return tabletitle247 248 235 def render(self): 249 236 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 250 237 Code = translate('Code', 'waeup.kofa', target_language=portal_language) 251 #Title = translate('Title', 'waeup.kofa', target_language=portal_language)252 #Dept = translate('Dept.', 'waeup.kofa', target_language=portal_language)253 #Faculty = translate('Faculty', 'waeup.kofa', target_language=portal_language)254 #Cred = translate(_('Credits'), 'waeup.uniben', target_language=portal_language)255 #Grade = translate('Grade', 'waeup.kofa', target_language=portal_language)256 238 studentview = StudentBasePDFFormPage(self.context.student, 257 239 self.request, self.omit_fields) … … 262 244 for i in range(1,7): 263 245 tabledata.append(sorted( 264 [value for value in self.context.values() if value.semester == i],265 key=lambda value: str(value.semester) +value.code))246 [value for value in self.context.values() if i == self.semester == value.semester], 247 key=lambda value: value.code)) 266 248 tableheader.append([(Code,'code', 2.5), 267 #(Title,'title', 5), 268 #(Dept,'dcode', 1.5), (Faculty,'fcode', 1.5), 269 #(Cred, 'credits', 1.5), 270 ('Signature','sig', 10), 249 ('Invigilator\'s Name','inv', 8), 250 ('Signature','sig', 7), 271 251 ]) 272 252 return students_utils.renderPDF( 273 self, 'examination_clearance_slip .pdf',253 self, 'examination_clearance_slip_%s.pdf' % self.semester, 274 254 self.context.student, studentview, 275 255 tableheader=tableheader, 276 256 tabledata=tabledata, 277 257 omit_fields=self.omit_fields, 278 topMargin=1. 1258 topMargin=1.3 279 259 ) 280 260 261 class ExportPDFExaminationClearanceSlip2(ExportPDFExaminationClearanceSlip1): 262 """Deliver a PDF slip of the context. 263 """ 264 grok.name('examination_clearance_slip_2.pdf') 265 semester = 2 266 267 @property 268 def label(self): 269 return '%s Second Semester Examination Clearance' % self.context.level_session 281 270 282 271 class CustomPaymentsManageFormPage(PaymentsManageFormPage):
Note: See TracChangeset for help on using the changeset viewer.