Index: mod/quiz/report/responses/report.php =================================================================== --- mod/quiz/report/responses/report.php (revision 16884) +++ mod/quiz/report/responses/report.php (revision ) @@ -124,7 +124,7 @@ $allowed = array(); } - if ($attemptids = optional_param('attemptid', array(), PARAM_INT) && confirm_sesskey()) { + if (($attemptids = optional_param('attemptid', array(), PARAM_INT)) && confirm_sesskey()) { require_capability('mod/quiz:deleteattempts', $this->context); $this->delete_selected_attempts($quiz, $cm, $attemptids, $allowed); redirect($reporturl->out(false, $displayoptions)); Index: mod/quiz/report/responses/responses_table.php =================================================================== --- mod/quiz/report/responses/responses_table.php (revision 16884) +++ mod/quiz/report/responses/responses_table.php (revision ) @@ -60,11 +60,11 @@ $url->param('sesskey', sesskey()); echo '
'; - echo '
'; echo html_writer::input_hidden_params($url); echo '
'; - $PAGE->requires->event_handler('#attemptsform', 'submit', 'M.util.show_confirm_dialog', - array('message' => get_string('deleteattemptcheck', 'quiz'))); + $PAGE->requires->event_handler('#attemptsform input[type="submit"]', 'click', 'M.util.show_confirm_dialog', + array('message' => get_string('deleteattemptcheck', 'quiz'), 'callback' => '(function() { document.getElementById("attemptsform").submit(); })')); } public function wrap_html_finish() {