Changeset 14524


Ignore:
Timestamp:
8 Feb 2017, 16:33:31 (8 years ago)
Author:
Henrik Bettermann
Message:

Replace 'credits taken' (credits counted) by 'credits registered' (total_credits).

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/level_report.py

    r14521 r14524  
    8383                stud.matric_number,
    8484                fullname,
    85                 level_obj.gpa_params[1],
     85                level_obj.total_credits,
    8686                passed_params[2],
    8787                format_float(level_obj.gpa, 3),
     
    8989                failed_courses,
    9090                not_taken_courses,
    91                 level_obj.cumulative_params[1],
     91                level_obj.cumulative_params[3],
    9292                level_obj.cumulative_params[4],
    9393                cgpa,
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py

    r14514 r14524  
    3838        ticket.passmark = 40
    3939        self.student['studycourse']['100']['Course3'] = ticket
     40        ticket = createObject('waeup.CourseTicket')
     41        ticket.code = 'Course4'
     42        ticket.credits = 30
     43        ticket.mandatory = False
     44        ticket.passmark = 40
     45        self.student['studycourse']['100']['Course4'] = ticket
    4046        # we can get a table with one student
    4147        result = get_students('fac1', 'dep1', 'CERT1', 2010, 100)
    4248        self.assertEqual(result,
    43             [(u'1234', u'Bob Tester', 90, 30, '1.666',
    44             'm_Course2_m Course3', '', 90, 30, '1.666', '')])
     49            [(u'1234', u'Bob Tester', 120, 30, '1.666',
     50            'm_Course2_m Course3', 'Course4', 120, 30, '1.666', '')])
    4551        # same result when selecting all certificates
    4652        result = get_students('fac1', 'dep1', 'all', 2010, 100)
    4753        self.assertEqual(result,
    48             [(u'1234', u'Bob Tester', 90, 30, '1.666',
    49             'm_Course2_m Course3', '', 90, 30, '1.666', '')])
     54            [(u'1234', u'Bob Tester', 120, 30, '1.666',
     55            'm_Course2_m Course3', 'Course4', 120, 30, '1.666', '')])
    5056        return
    5157
     
    5359        self.student.firstname = u'Johnathan Emmanuel Amenaghawon'
    5460        self.student.lastname = u'Ehissouria'
     61        self.student['studycourse']['100']['Course1'].passmark = 40
    5562        ticket = createObject('waeup.CourseTicket')
    5663        ticket.code = 'Course2'
     
    7481        self.student['studycourse']['100']['Course5'] = ticket3
    7582        ticket4 = createObject('waeup.CourseTicket')
    76         ticket4.code = 'Course5'
     83        ticket4.code = 'Course6'
    7784        ticket4.credits = 30
    7885        self.student['studycourse']['100']['Course6'] = ticket4
     
    8289        path = os.path.join(samples_dir(), 'level_report.pdf')
    8390        open(path, 'wb').write(result)
     91        # Credits counted (taken): 90
     92        # Credits passed: 60
     93        # Credits failed: 30
     94        # Credits registered (total_credits): 180
     95        # Course1 and Course3 are passed
     96        # Course2 is failed
     97        # Course4, Course5 and Course6 have not ben taken
    8498        print "Sample level_report.pdf written to %s" % path
    8599        return
Note: See TracChangeset for help on using the changeset viewer.