Changeset 14524 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 8 Feb 2017, 16:33:31 (8 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/level_report.py
r14521 r14524 83 83 stud.matric_number, 84 84 fullname, 85 level_obj. gpa_params[1],85 level_obj.total_credits, 86 86 passed_params[2], 87 87 format_float(level_obj.gpa, 3), … … 89 89 failed_courses, 90 90 not_taken_courses, 91 level_obj.cumulative_params[ 1],91 level_obj.cumulative_params[3], 92 92 level_obj.cumulative_params[4], 93 93 cgpa, -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py
r14514 r14524 38 38 ticket.passmark = 40 39 39 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 40 46 # we can get a table with one student 41 47 result = get_students('fac1', 'dep1', 'CERT1', 2010, 100) 42 48 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', '')]) 45 51 # same result when selecting all certificates 46 52 result = get_students('fac1', 'dep1', 'all', 2010, 100) 47 53 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', '')]) 50 56 return 51 57 … … 53 59 self.student.firstname = u'Johnathan Emmanuel Amenaghawon' 54 60 self.student.lastname = u'Ehissouria' 61 self.student['studycourse']['100']['Course1'].passmark = 40 55 62 ticket = createObject('waeup.CourseTicket') 56 63 ticket.code = 'Course2' … … 74 81 self.student['studycourse']['100']['Course5'] = ticket3 75 82 ticket4 = createObject('waeup.CourseTicket') 76 ticket4.code = 'Course 5'83 ticket4.code = 'Course6' 77 84 ticket4.credits = 30 78 85 self.student['studycourse']['100']['Course6'] = ticket4 … … 82 89 path = os.path.join(samples_dir(), 'level_report.pdf') 83 90 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 84 98 print "Sample level_report.pdf written to %s" % path 85 99 return
Note: See TracChangeset for help on using the changeset viewer.