Editing feedback for earlier attempt - URL incorrect for button (Moodle 3.1)

Editing feedback for earlier attempt - URL incorrect for button (Moodle 3.1)

by Andrew Earley -
Number of replies: 1
Hello,

When trying to edit the feedback of an earlier attempt on the assignments, the link seems to be incorrect. The URL seems to be built using HTML codes for some ASCII for example '%3D' for '='. An example, provided this for the end of the URL '&returnparams=userid%3D8427%26amp%3Brownum%3D0%26amp%3Buseridlistid%3D0' this does not work, and defaults to the first user on the list.

Has anyone else seen this issue?


Average of ratings: -
In reply to Andrew Earley

Re: Editing feedback for earlier attempt - URL incorrect for button (Moodle 3.1)

by Andrew Earley -

I seem to have found the issue.

Within the 'renderer.php' file 'http_build_query' is used to build a section of the URL. This in itself is not the problem and works as intended, however there may be a sanitation process when a new 'moodle_url' is created to remove unwanted characters within the '$urlparams' array. I have changed this to call each value in the array rather than use 'http_build_query' to build part of the URL, this keeps the same information but does not include the unwanted ascii codes and works as intended.