Changeset 16236 for main


Ignore:
Timestamp:
14 Sep 2020, 06:39:52 (4 years ago)
Author:
Henrik Bettermann
Message:

There are no history.messages in tests.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r16235 r16236  
    11171117        submission_date = ''
    11181118        for applicant in results:
    1119             if 'submitted' in applicant.history.messages[-1]:
     1119            if applicant.history.messages \
     1120                and 'submitted' in applicant.history.messages[-1]:
    11201121                submission_date = applicant.history.messages[-1][0:10]
    11211122            applicants.append((applicant, submission_date))
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/raw_score_report.py

    r15039 r16236  
    6565        course = certcourse.course
    6666        if certcourse.course_category:
    67             col_names += (TTR('%s (%s, %s)' % (
    68                 course.code, course.credits, certcourse.course_category)),)
     67            col_names += (TTR('%s (%s)' % (
     68                course.code, certcourse.course_category)),)
    6969        else:
    70             col_names += (TTR('%s (%s)' % (course.code, course.credits)),)
     70            col_names += (TTR('%s' % (course.code,)),)
    7171    table = [col_names]
    7272    sn = 1
     
    7979                scores += ('N/R',)
    8080            else:
    81                 scores += ('%s %s' % (result[0], result[1]),)
     81                scores += ('%s %s (%s)' % (result[0], result[1], result[2]),)
    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*cm] * len(self.certcourses)
     126        return [1*cm, 4*cm, 5*cm] + [1.5*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)
     190                        scores[ticket.code] = (ticket.total_score, ticket.grade,
     191                                               ticket.credits)
    191192                    else:
    192                         scores[ticket.code] = ('Nil', '')
     193                        scores[ticket.code] = ('Nil', '', '')
    193194            fullname = textwrap.fill(stud.display_fullname, 26)
    194195            line = (
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_raw_score_report.py

    r14643 r16236  
    5252            'fac1', 'dep1', 'CERT1', 2010, 100, course_codes)
    5353        self.assertEqual(result,
    54             [(u'1234', u'Bob Tester', {'Course1': (70, 'A')})])
     54            [(u'1234', u'Bob Tester', {'Course1': (70, 'A', 30)})])
    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.