MDL-71378 core_question & mod_quiz: Refactor deprecated contexts

This commit is contained in:
Simon Adams
2024-11-18 10:22:59 +00:00
parent 5955868d3d
commit a0cf3d2da5
183 changed files with 1266 additions and 2721 deletions
+5
View File
@@ -30,6 +30,11 @@ use core_question\local\bank\view;
require_once(__DIR__ . '/../config.php');
require_once($CFG->dirroot . '/question/editlib.php');
// Since Moodle 5.0 any request with the courseid parameter is deprecated and will redirect to the banks management page.
if ($courseid = optional_param('courseid', 0, PARAM_INT)) {
redirect(new moodle_url('/question/banks.php', ['courseid' => $courseid]));
}
list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
question_edit_setup('questions', '/question/edit.php');