-
Bug
-
Resolution: Fixed
-
Major
-
4.2
-
MOODLE_402_STABLE
-
MOODLE_402_STABLE
-
MDL-77889-master -
-
4
-
Team Alpha - Sprint 4 I1-2023
MDL-76246 adds a required parameter after an optional one to the init function of grade/amd/src/searchwidget/basewidget.js
This js class was added in Moodle 4.1 and so we can't just add parameters in this way.
The registerListenerEvents() function now also looks for data-input-element on line 120 which did not exist in 4.1 and also breaks backwards compatibility.
Replication steps:
- Install the following local plugin https://github.com/abgreeve/local_gradeselectortest on a Moodle 4.1 branch.
- Go to a course and in the more menu of the secondary navigation click "Selector test"
- Click the selector "Select an item" and select an item
- The page should refresh and there should be a message that says "Item
{1}
was selected" where 1 can change depending on the item selected.
- Upgrade to current master
- Repeat steps 2 - 4
- Expected result: Everything works as it did in Moodle 4.1
- Actual result: Errors, and no ability to select an item.
There is something additional to what I noted above that stop the selection of an item working. Please make sure that the existing functionality is maintained with fixes made on this issue.