Block Plugins on Courses

Re: Block Plugins on Courses

аз Davo Smith -
Number of replies: 0
Сурати  корбар Core developers Сурати  корбар Particularly helpful Moodlers Сурати  корбар Peer reviewers Сурати  корбар Plugin developers
The form built in to this plugin isn't checking to see what parameters were included in the current page URL. The code for the form will need updating so that it detects these parameters and makes sure that they are included as 'hidden' fields in the form.

The required code would look something like this (in the form's definition() function, assuming the form is using a standard Moodle form for the content):

global $PAGE;
foreach ($PAGE->params() as $name => $value) {
$mform->addElement('hidden', $name, $value);
$mform->setType($name, PARAM_RAW);
}