Skip to content

Commit

Permalink
Merge branch 'MDL-38282' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese committed Mar 5, 2013
2 parents 810fb77 + 9fc29ee commit ce91af8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mod/quiz/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,11 @@ function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmo
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);
Expand Down

0 comments on commit ce91af8

Please sign in to comment.