Changeset 16236 for main/waeup.kofa/trunk/src/waeup/kofa/students/reports
- Timestamp:
- 14 Sep 2020, 06:39:52 (4 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students/reports
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/raw_score_report.py
r15039 r16236 65 65 course = certcourse.course 66 66 if certcourse.course_category: 67 col_names += (TTR('%s (%s , %s)' % (68 course.code, c ourse.credits, certcourse.course_category)),)67 col_names += (TTR('%s (%s)' % ( 68 course.code, certcourse.course_category)),) 69 69 else: 70 col_names += (TTR('%s (%s)' % (course.code, course.credits)),)70 col_names += (TTR('%s' % (course.code,)),) 71 71 table = [col_names] 72 72 sn = 1 … … 79 79 scores += ('N/R',) 80 80 else: 81 scores += ('%s %s ' % (result[0], result[1]),)81 scores += ('%s %s (%s)' % (result[0], result[1], result[2]),) 82 82 composed_line += scores 83 83 table.append(composed_line) … … 124 124 @property 125 125 def col_width(self): 126 return [1*cm, 4*cm, 5*cm] + [1 *cm] * len(self.certcourses)126 return [1*cm, 4*cm, 5*cm] + [1.5*cm] * len(self.certcourses) 127 127 128 128 @property … … 188 188 if ticket.code in [i.course.code for i in certcourses]: 189 189 if ticket.total_score is not None: 190 scores[ticket.code] = (ticket.total_score, ticket.grade) 190 scores[ticket.code] = (ticket.total_score, ticket.grade, 191 ticket.credits) 191 192 else: 192 scores[ticket.code] = ('Nil', '' )193 scores[ticket.code] = ('Nil', '', '') 193 194 fullname = textwrap.fill(stud.display_fullname, 26) 194 195 line = ( -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_raw_score_report.py
r14643 r16236 52 52 'fac1', 'dep1', 'CERT1', 2010, 100, course_codes) 53 53 self.assertEqual(result, 54 [(u'1234', u'Bob Tester', {'Course1': (70, 'A' )})])54 [(u'1234', u'Bob Tester', {'Course1': (70, 'A', 30)})]) 55 55 self.student['studycourse']['100']['Course1'].score = None 56 56 result = rsr._get_students( 57 57 'fac1', 'dep1', 'CERT1', 2010, 100, course_codes) 58 58 self.assertEqual(result, 59 [(u'1234', u'Bob Tester', {'Course1': ('Nil', '' )})])59 [(u'1234', u'Bob Tester', {'Course1': ('Nil', '', '')})]) 60 60 return 61 61
Note: See TracChangeset for help on using the changeset viewer.