Changeset 14042 for main/waeup.aaue/trunk/src/waeup
- Timestamp:
- 2 Aug 2016, 14:45:49 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/raw_score_report.py
r14041 r14042 117 117 'Matric No.', 118 118 'Name', 119 #TTR('xxx'),120 119 ) 120 catalog = getUtility(ICatalog, name='courses_catalog') 121 121 for code in course_codes: 122 col_names += (TTR(code),) 122 course = list(catalog.searchResults(code=(code, code)))[0] 123 col_names += (TTR('%s (%s)' % (course.title, code)),) 123 124 table = [col_names] 124 125 sn = 1 126 scores = tuple() 125 127 for line in data: 126 128 composed_line = (sn,) + line[:-1] 127 scores = tuple([ 128 '%s%s' % (line[-1][code][0],line[-1][code][1]) 129 for code in course_codes]) 129 for code in course_codes: 130 result = line[-1].get(code) 131 if not result: 132 continue 133 scores += ('%s%s' % (result[0], result[1]),) 130 134 composed_line += scores 131 135 table.append(composed_line)
Note: See TracChangeset for help on using the changeset viewer.