Changeset 16239 for main


Ignore:
Timestamp:
17 Sep 2020, 07:16:01 (4 years ago)
Author:
Henrik Bettermann
Message:

Revert changes of last revision.

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  
    6565        course = certcourse.course
    6666        if certcourse.course_category:
    67             col_names += (TTR('%s (%s)' % (
    68                 course.code, certcourse.course_category)),)
     67            col_names += (TTR('%s (%s, %s)' % (
     68                course.code, course.credits, certcourse.course_category)),)
    6969        else:
    70             col_names += (TTR('%s' % (course.code,)),)
     70            col_names += (TTR('%s (%s)' % (course.code, course.credits)),)
    7171    table = [col_names]
    7272    sn = 1
     
    7979                scores += ('N/R',)
    8080            else:
    81                 scores += ('%s %s (%s)' % (result[0], result[1], result[2]),)
     81                scores += ('%s %s' % (result[0], result[1]),)
    8282        composed_line += scores
    8383        table.append(composed_line)
     
    124124    @property
    125125    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)
    127127
    128128    @property
     
    188188                if ticket.code in [i.course.code for i in certcourses]:
    189189                    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)
    192191                    else:
    193                         scores[ticket.code] = ('Nil', '', '')
     192                        scores[ticket.code] = ('Nil', '')
    194193            fullname = textwrap.fill(stud.display_fullname, 26)
    195194            line = (
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_raw_score_report.py

    r16236 r16239  
    5252            'fac1', 'dep1', 'CERT1', 2010, 100, course_codes)
    5353        self.assertEqual(result,
    54             [(u'1234', u'Bob Tester', {'Course1': (70, 'A', 30)})])
     54            [(u'1234', u'Bob Tester', {'Course1': (70, 'A')})])
    5555        self.student['studycourse']['100']['Course1'].score = None
    5656        result = rsr._get_students(
    5757            'fac1', 'dep1', 'CERT1', 2010, 100, course_codes)
    5858        self.assertEqual(result,
    59             [(u'1234', u'Bob Tester', {'Course1': ('Nil', '', '')})])
     59            [(u'1234', u'Bob Tester', {'Course1': ('Nil', '')})])
    6060        return
    6161
Note: See TracChangeset for help on using the changeset viewer.