mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
changing param type for returnurl to PARAM_LOCALURL
This commit is contained in:
parent
af8ed6dcba
commit
7cd4fda6e7
@ -13,7 +13,7 @@ require_once(dirname(__FILE__) . '/editlib.php');
|
||||
require_once($CFG->libdir . '/filelib.php');
|
||||
require_once($CFG->libdir . '/formslib.php');
|
||||
|
||||
$returnurl = optional_param('returnurl', 0, PARAM_URL);
|
||||
$returnurl = optional_param('returnurl', 0, PARAM_LOCALURL);
|
||||
|
||||
// Read URL parameters telling us which question to edit.
|
||||
$id = optional_param('id', 0, PARAM_INT); // question id
|
||||
|
@ -116,6 +116,10 @@ class question_edit_form extends moodleform {
|
||||
$mform->setType('cmid', PARAM_INT);
|
||||
$mform->setDefault('cmid', 0);
|
||||
|
||||
$mform->addElement('hidden', 'returnurl');
|
||||
$mform->setType('returnurl', PARAM_LOCALURL);
|
||||
$mform->setDefault('returnurl', '');
|
||||
|
||||
$buttonarray = array();
|
||||
$buttonarray[] = &$mform->createElement('submit', 'submitbutton', get_string('savechanges'));
|
||||
if (!empty($this->question->id)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user