Skip to content

Commit

Permalink
MDL-27314 quiz attempts cannot be deleted in separate groups mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Sazonov authored and timhunt committed Dec 1, 2011
1 parent 1de9151 commit 21bedda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/quiz/report/attemptsreport.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ protected function delete_selected_attempts($quiz, $cm, $attemptids, $allowed) {
// Ensure the attempt exists, and belongs to this quiz. If not skip. // Ensure the attempt exists, and belongs to this quiz. If not skip.
continue; continue;
} }
if ($allowed && !array_key_exists($attempt->userid, $allowed)) { if ($allowed && !in_array($attempt->userid, $allowed)) {
// Ensure the attempt belongs to a student included in the report. If not skip. // Ensure the attempt belongs to a student included in the report. If not skip.
continue; continue;
} }
Expand Down

0 comments on commit 21bedda

Please sign in to comment.