mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-32240 quiz editing: check permissions questions are added.
We also check permissions when removing questions from the quiz, so that we do not let users make mistakes they cannot immediately undo. Conflicts: mod/quiz/editlib.php
This commit is contained in:
parent
29e247e44e
commit
0175c5efaa
8 changed files with 120 additions and 39 deletions
|
@ -188,6 +188,7 @@ if ($id) {
|
|||
$formeditable = true;
|
||||
require_capability('moodle/question:add', $categorycontext);
|
||||
}
|
||||
$question->formoptions->mustbeusable = (bool) $appendqnumstring;
|
||||
|
||||
// Validate the question type.
|
||||
$PAGE->set_pagetype('question-type-' . $question->qtype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue