Permalink
Browse files

Merge branch 'MDL-27314_20' of git://github.com/timhunt/moodle into M…

…OODLE_20_STABLE
  • Loading branch information...
2 parents 3b1a4a0 + 17d339e commit 2baa09dd5f72e41ffc130f0f09ebc3bf0c9130b7 @stronk7 stronk7 committed Dec 7, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 mod/quiz/report/overview/report.php
  2. +2 −2 mod/quiz/report/responses/report.php
@@ -634,11 +634,11 @@ function delete_selected_attempts($quiz, $cm, $attemptids, $allowed, $groupstude
// 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;
}
- if ($groupstudents && !array_key_exists($attempt->userid, $groupstudents)) {
+ if ($groupstudents && !in_array($attempt->userid, $groupstudents)) {
// Additional check in groups mode.
continue;
}
@@ -114,11 +114,11 @@ function display($quiz, $cm, $course) {
// Ensure the attempt exists, and belongs to this quiz. If not skip.
continue;
}
- if ($attemptsmode != QUIZ_REPORT_ATTEMPTS_ALL && !array_key_exists($attempt->userid, $students)) {
+ if ($attemptsmode != QUIZ_REPORT_ATTEMPTS_ALL && !in_array($attempt->userid, $students)) {
// Ensure the attempt belongs to a student included in the report. If not skip.
continue;
}
- if ($groupstudents && !array_key_exists($attempt->userid, $groupstudents)) {
+ if ($groupstudents && !in_array($attempt->userid, $groupstudents)) {
// Additional check in groups mode.
continue;
}

0 comments on commit 2baa09d

Please sign in to comment.