Affects Version/s: 2.2.10, 2.5
Fix Version/s: None
Affected Branches:MOODLE_22_STABLE, MOODLE_25_STABLE
To reproduce the problem:
- Add a few grade items to a course
- Set the aggregation to "Sum of grade"
- Set to Aggregate only non-empty grades
- Set user report setting "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
- Hide one of the grade items
- Enter grades for a user only for the visible items
- View the user report for the user. You will notice that the course total is not accurate. It should be a sum of the entered grades, but it is grater than that.
Item 01 - 50/100
Item 02 (hidden) - empty
Item 03 - 50/100
user report shows a course total of 150 rather than the expected 100.