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:
Tim Hunt 2012-03-28 13:55:17 +01:00
parent 29e247e44e
commit 0175c5efaa
8 changed files with 120 additions and 39 deletions

View file

@ -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);