mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Merge branch 'MDL-38282' of git://github.com/timhunt/moodle
This commit is contained in:
commit
ce91af8114
@ -277,8 +277,11 @@ $remove = optional_param('remove', false, PARAM_INT);
|
||||
if ($remove && confirm_sesskey()) {
|
||||
// Remove a question from the quiz.
|
||||
// We require the user to have the 'use' capability on the question,
|
||||
// so that then can add it back if they remove the wrong one by mistake.
|
||||
quiz_require_question_use($remove);
|
||||
// so that then can add it back if they remove the wrong one by mistake,
|
||||
// but, if the question is missing, it can always be removed.
|
||||
if ($DB->record_exists('question', array('id' => $remove))) {
|
||||
quiz_require_question_use($remove);
|
||||
}
|
||||
quiz_remove_question($quiz, $remove);
|
||||
quiz_delete_previews($quiz);
|
||||
quiz_update_sumgrades($quiz);
|
||||
|
Loading…
x
Reference in New Issue
Block a user