Changeset 16239 for main/waeup.kofa/trunk/src
- Timestamp:
- 17 Sep 2020, 07:16:01 (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
r16236 r16239 65 65 course = certcourse.course 66 66 if certcourse.course_category: 67 col_names += (TTR('%s (%s )' % (68 course.code, c ertcourse.course_category)),)67 col_names += (TTR('%s (%s, %s)' % ( 68 course.code, course.credits, certcourse.course_category)),) 69 69 else: 70 col_names += (TTR('%s ' % (course.code,)),)70 col_names += (TTR('%s (%s)' % (course.code, course.credits)),) 71 71 table = [col_names] 72 72 sn = 1 … … 79 79 scores += ('N/R',) 80 80 else: 81 scores += ('%s %s (%s)' % (result[0], result[1], result[2]),)81 scores += ('%s %s' % (result[0], result[1]),) 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 .5*cm] * len(self.certcourses)126 return [1*cm, 4*cm, 5*cm] + [1*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, 191 ticket.credits) 190 scores[ticket.code] = (ticket.total_score, ticket.grade) 192 191 else: 193 scores[ticket.code] = ('Nil', '' , '')192 scores[ticket.code] = ('Nil', '') 194 193 fullname = textwrap.fill(stud.display_fullname, 26) 195 194 line = ( -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_raw_score_report.py
r16236 r16239 52 52 'fac1', 'dep1', 'CERT1', 2010, 100, course_codes) 53 53 self.assertEqual(result, 54 [(u'1234', u'Bob Tester', {'Course1': (70, 'A' , 30)})])54 [(u'1234', u'Bob Tester', {'Course1': (70, 'A')})]) 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.