Ignore:
Timestamp:
13 Jan 2017, 11:34:53 (8 years ago)
Author:
Henrik Bettermann
Message:

List codes of course w/o result.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py

    r14390 r14392  
    6060        passed_params = level_obj.passed_params
    6161        failed_courses = textwrap.fill(passed_params[4], 35)
     62        not_taken_courses = textwrap.fill(passed_params[5], 17)
    6263        fullname = textwrap.fill(stud.display_fullname, 29)
    6364        # This is a very special column requested by AAUE, Nigeria.
     
    7778                '%.3f' % (int(1000*level_obj.gpa)/1000.0),
    7879                failed_courses,
    79                 passed_params[5],
     80                not_taken_courses,
    8081                level_obj.cumulative_params[1],
    8182                level_obj.cumulative_params[4],
     
    125126            TTR(translate(_('GPA'))),
    126127            translate(_('Courses Failed')),
    127             TTR(translate(_('Courses w/o Result'))),
     128            translate(_('Courses w/o Result')),
    128129            TTR(translate(_('Cum. Credits Taken'))),
    129130            TTR(translate(_('Cum. Credits Passed'))),
     
    156157    ('ALIGN', (0,0), (0,-1), 'RIGHT'),
    157158    ('ALIGN', (6,0), (6,-1), 'LEFT'),
     159    ('ALIGN', (7,0), (7,-1), 'LEFT'),
    158160    ('INNERGRID', (0,1), (-1,-1), 0.25, colors.black),
    159161    ('BOX', (0,1), (-1,-1), 1, colors.black),
     
    195197        #col_widths = [3.5*cm] * len(self.data[0])
    196198        col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 1*cm,
    197                       6*cm, 0.8*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm]
     199                      6*cm, 3*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm]
    198200        pdf_data = [Paragraph('<b>%s - Report %s</b>'
    199201                              % (self.creation_dt_string, job_id),
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py

    r14390 r14392  
    4242        self.assertEqual(result,
    4343            [(u'1234', u'Bob Tester', 90, 30, '1.666',
    44             'm_Course2_m Course3', 0, 90, 30, '1.666', '')])
     44            'm_Course2_m Course3', '', 90, 30, '1.666', '')])
    4545        return
    4646
     
    5959        ticket.credits = 30
    6060        ticket.score = 30
    61         ticket.mandatory = False
    62         ticket.passmark = 40
    6361        self.student['studycourse']['100']['Course3'] = ticket
     62        ticket2 = createObject('waeup.CourseTicket')
     63        ticket2.code = 'Course4'
     64        ticket2.credits = 30
     65        self.student['studycourse']['100']['Course4'] = ticket2
     66        ticket3 = createObject('waeup.CourseTicket')
     67        ticket3.code = 'Course5'
     68        ticket3.credits = 30
     69        self.student['studycourse']['100']['Course5'] = ticket3
     70        ticket4 = createObject('waeup.CourseTicket')
     71        ticket4.code = 'Course5'
     72        ticket4.credits = 30
     73        self.student['studycourse']['100']['Course6'] = ticket4
    6474        report = LevelReport('fac1', 'dep1', 2010, 100)
    6575        result = report.create_pdf('JOB_ID')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py

    r14382 r14392  
    164164        credits_failed = 0
    165165        credits_passed = 0
    166         no_courses_not_taken = 0
     166        courses_not_taken = ''
    167167        for ticket in self.values():
    168168            if ticket.total_score is not None:
     
    178178                    credits_passed += ticket.credits
    179179            else:
    180                 no_courses_not_taken += 1
     180                courses_not_taken += '%s ' % ticket.code
    181181        return (passed, failed, credits_passed,
    182182                credits_failed, courses_failed,
    183                 no_courses_not_taken)
     183                courses_not_taken)
    184184
    185185    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r14382 r14392  
    895895        self.assertEqual(
    896896            self.student['studycourse']['100'].passed_params,
    897             (1, 1, 13, 10, 'COURSE1 ', 0))
     897            (1, 1, 13, 10, 'COURSE1 ', ''))
    898898        self.assertEqual(
    899899            self.student['studycourse']['200'].passed_params,
    900             (0, 0, 0, 0, '', 1))
     900            (0, 0, 0, 0, '', 'COURSE1 '))
    901901        # And also cumulative params can be calculated. Meanwhile we have the
    902902        # following courses: COURSE1 and COURSE2 in level 100 and
Note: See TracChangeset for help on using the changeset viewer.