MDL-76897 quiz: get the context more efficiently where possible

This commit is contained in:
Tim Hunt
2023-02-27 18:41:56 +00:00
parent 1ee7f41762
commit c12ff3d5f3
9 changed files with 36 additions and 15 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ if (!$category = $DB->get_record('question_categories', ['id' => $filterconditio
$catcontext = context::instance_by_id($category->contextid);
require_capability('moodle/question:useall', $catcontext);
$thiscontext = context_module::instance($cm->id);
$thiscontext = $quizobj->get_context();
$contexts = new core_question\local\bank\question_edit_contexts($thiscontext);
// Create the editing form.