From 8f64668af2fb801a1803f8f62e1b18eaabd5a4bb Mon Sep 17 00:00:00 2001 From: Igor Sazonov Date: Thu, 1 Dec 2011 16:21:07 +0000 Subject: [PATCH] MDL-27314 quiz attempts cannot be deleted in separate groups mode. --- mod/quiz/report/attemptsreport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/quiz/report/attemptsreport.php b/mod/quiz/report/attemptsreport.php index f26b2ec7071..6c7ab35ea9e 100644 --- a/mod/quiz/report/attemptsreport.php +++ b/mod/quiz/report/attemptsreport.php @@ -360,7 +360,7 @@ abstract class quiz_attempt_report extends quiz_default_report { // Ensure the attempt exists, and belongs to this quiz. If not skip. 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. continue; }