mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-34807 question bank: navigation loses place.
The symptom is that where we are now is not shown in the settings navigation. However, the underlying cause is that question/edit.php is doing some crazy thing of its own to build $PAGE->url, rather than using the one returned by question_edit_setup. Not that this patch itentionally removes the returnurl param. It was added as part of a big change MDL-20276, which I think just got this detail wrong. That variable is never used.
This commit is contained in:
parent
87e9331d93
commit
75d86b6fbc
@ -27,32 +27,15 @@
|
||||
require_once(dirname(__FILE__) . '/../config.php');
|
||||
require_once($CFG->dirroot . '/question/editlib.php');
|
||||
|
||||
$url = new moodle_url('/question/edit.php');
|
||||
list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
|
||||
question_edit_setup('questions', '/question/edit.php');
|
||||
|
||||
$url = new moodle_url($thispageurl);
|
||||
if (($lastchanged = optional_param('lastchanged', 0, PARAM_INT)) !== 0) {
|
||||
$url->param('lastchanged', $lastchanged);
|
||||
}
|
||||
if (($category = optional_param('category', 0, PARAM_TEXT)) !== 0) {
|
||||
$url->param('category', $category);
|
||||
}
|
||||
if (($qpage = optional_param('qpage', 0, PARAM_INT)) !== 0) {
|
||||
$url->param('qpage', $qpage);
|
||||
}
|
||||
if (($cat = optional_param('cat', 0, PARAM_TEXT)) !== 0) {
|
||||
$url->param('cat', $cat);
|
||||
}
|
||||
if (($courseid = optional_param('courseid', 0, PARAM_INT)) !== 0) {
|
||||
$url->param('courseid', $courseid);
|
||||
}
|
||||
if (($returnurl = optional_param('returnurl', 0, PARAM_INT)) !== 0) {
|
||||
$url->param('returnurl', $returnurl);
|
||||
}
|
||||
if (($cmid = optional_param('cmid', 0, PARAM_INT)) !== 0) {
|
||||
$url->param('cmid', $cmid);
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
|
||||
list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
|
||||
question_edit_setup('questions', '/question/edit.php');
|
||||
$questionbank = new question_bank_view($contexts, $thispageurl, $COURSE, $cm);
|
||||
$questionbank->process_actions();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user