mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-38282_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
18329cbf1e
1 changed files with 5 additions and 2 deletions
|
@ -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.
|
||||
// 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…
Add table
Add a link
Reference in a new issue