-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.2.6, 4.3.3
-
MOODLE_402_STABLE, MOODLE_403_STABLE
Deep linking is currently broken when using ONLY whole forum grading (i.e. not forum ratings as well). I'll create a fix for this, but basically it's down to a simple array index issue in this code:
https://github.com/moodle/moodle/blob/b42e47fb4afe240c11251806399f6b5cd21cd2e5/enrol/lti/classes/local/ltiadvantage/repository/published_resource_repository.php#L111
That task code assumes the items indexes start at 0, but that's not always the case. In this particular case, where whole forum grading is the only method used in forum, the only index in gradinginfo->items is index 1 - an index which gets set based on this code: https://github.com/moodle/moodle/blob/92b229c5f404a04750b779fc98ae817d160aba29/mod/forum/classes/grades/gradeitems.php#L49. We basically just want the first array item, and that may or may not be index 0.