-
Bug
-
Resolution: Fixed
-
Minor
-
3.9
-
MOODLE_39_STABLE
-
MOODLE_39_STABLE
-
MDL-69065-master -
-
3.9 release work board, 4.0 holding pattern
I am using the Moodle 3.9 master (2020061500.00) and noticed that our custom format is broken when adding a course module via the new Activity chooser.
The problem is that on current STABLE moodle versions the "sr" parameter is being set, but on master the "sr" parameter is no longer being set and just left null.
Example:
Moodle 3.5 URL when adding content: https://ccle.ucla.edu/course/modedit.php?add=assign&type=&course=212§ion=3&return=0&sr=3
Moodle master URL when adding content: https://qa.moodledemo.net/course/modedit.php?add=assign&type=&course=2§ion=1&return=0&sr=
Some formats use "sr", such as ours, use that parameter when overriding the get_view_url() method when we inherit format_base.
Is the "sr" parameter being deprecated? If so, we can adjust our code to account for it, but it seems like a bug that the new activity chooser is just not setting it properly.
The JS code that appears to be missing setting the sr parameter is: https://github.com/moodle/moodle/blob/master/course/amd/src/activitychooser.js#L144
It is just setting "module.link += '§ion=' + id;"
With no sr parameter.