Project: moodle
Issue MDL-46736: Handle grades associated with deleted grade items in the history report
The query getting all the grades joins on grade_item to filter on course ID. Whenever a grade item is not found, the course ID would be considered as null and thus not being used. We need to update the SQL query to handle the deleted grade items, possibly by joining on the grade_item_history table rather than the grade_item one. {code} $ git grep MDL-46736 grade/report/history/tests/report_test.php: // TODO MDL-46736 Handle deleted/non-existing grade items. {code}
Story points: 20