- Timestamp:
- 29 Jul 2013, 16:25:14 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r10436 r10438 1260 1260 1261 1261 @property 1262 def content_title_1(self):1263 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE1264 return translate(_('1st Semester Courses'), 'waeup.kofa',1265 target_language=portal_language)1266 1267 @property1268 def content_title_2(self):1269 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE1270 return translate(_('2nd Semester Courses'), 'waeup.kofa',1271 target_language=portal_language)1272 1273 @property1274 def content_title_3(self):1275 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE1276 return translate(_('Level Courses'), 'waeup.kofa',1277 target_language=portal_language)1278 1279 @property1280 1262 def label(self): 1281 1263 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE … … 1301 1283 self.request, self.omit_fields) 1302 1284 students_utils = getUtility(IStudentsUtils) 1303 tabledata_1 = sorted( 1304 [value for value in self.context.values() if value.semester == 1], 1305 key=lambda value: str(value.semester) + value.code) 1306 tabledata_2 = sorted( 1307 [value for value in self.context.values() if value.semester == 2], 1308 key=lambda value: str(value.semester) + value.code) 1309 tabledata_3 = sorted( 1310 [value for value in self.context.values() if value.semester == 3], 1311 key=lambda value: str(value.semester) + value.code) 1312 tableheader = [(Code,'code', 2.5), 1313 (Title,'title', 5), 1314 (Dept,'dcode', 1.5), (Faculty,'fcode', 1.5), 1315 (Cred, 'credits', 1.5), 1316 #(Mand, 'mandatory', 1.5), 1317 (Score, 'score', 1.5), 1318 (Grade, 'grade', 1.5), 1319 #('Auto', 'automatic', 1.5) 1320 ] 1285 1286 tabledata = [] 1287 tableheader = [] 1288 contenttitle = [] 1289 for i in range(6): 1290 tabledata.append(sorted( 1291 [value for value in self.context.values() if value.semester == i], 1292 key=lambda value: str(value.semester) + value.code)) 1293 tableheader.append([(Code,'code', 2.5), 1294 (Title,'title', 5), 1295 (Dept,'dcode', 1.5), (Faculty,'fcode', 1.5), 1296 (Cred, 'credits', 1.5), 1297 #(Mand, 'mandatory', 1.5), 1298 (Score, 'score', 1.5), 1299 (Grade, 'grade', 1.5), 1300 #('Auto', 'automatic', 1.5) 1301 ]) 1302 contenttitle.append(None) 1303 1304 contenttitle[1] = translate(_('1st Semester Courses'), 'waeup.kofa', 1305 target_language=portal_language) 1306 contenttitle[2] = translate(_('2nd Semester Courses'), 'waeup.kofa', 1307 target_language=portal_language) 1308 contenttitle[3] = translate(_('Level Courses'), 'waeup.kofa', 1309 target_language=portal_language) 1310 1321 1311 return students_utils.renderPDF( 1322 1312 self, 'course_registration_slip.pdf', 1323 1313 self.context.student, studentview, 1324 tableheader_1=tableheader, 1325 tabledata_1=tabledata_1, 1326 tableheader_2=tableheader, 1327 tabledata_2=tabledata_2, 1328 tableheader_3=tableheader, 1329 tabledata_3=tabledata_3, 1314 tableheader=tableheader, 1315 tabledata=tabledata, 1316 contenttitle=contenttitle, 1330 1317 omit_fields=self.omit_fields 1331 1318 )
Note: See TracChangeset for help on using the changeset viewer.