- Timestamp:
- 12 Jan 2017, 17:00:20 (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
r14387 r14390 64 64 # The 'remark' column remains empty in base package. 65 65 remark = getattr(level_obj, 'remark', '') 66 end_level = getattr(stud['studycourse'].certificate, 'end_level', None) 67 if end_level and level >= end_level: 68 cgpa = '%.2f' % (int(100*level_obj.cumulative_params[0])/100.0) 69 else: 70 cgpa = '%.3f' % (int(1000*level_obj.cumulative_params[0])/1000.0) 66 71 line = ( 67 72 #stud.student_id, … … 70 75 level_obj.gpa_params[1], 71 76 passed_params[2], 72 '%. 2f' % (int(100*level_obj.gpa)/100.0),77 '%.3f' % (int(1000*level_obj.gpa)/1000.0), 73 78 failed_courses, 74 79 passed_params[5], 75 80 level_obj.cumulative_params[1], 76 81 level_obj.cumulative_params[4], 77 '%.3f' % (int(1000*level_obj.cumulative_params[0])/1000.0),82 cgpa, 78 83 remark, 79 84 ) -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py
r14387 r14390 41 41 result = get_students('fac1', 'dep1', 2010, 100) 42 42 self.assertEqual(result, 43 [(u'1234', u'Bob Tester', 90, 30, '1.66 ',43 [(u'1234', u'Bob Tester', 90, 30, '1.666', 44 44 'm_Course2_m Course3', 0, 90, 30, '1.666', '')]) 45 45 return
Note: See TracChangeset for help on using the changeset viewer.