Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-27314 quiz attempts cannot be deleted in separate groups mode.

  • Loading branch information...
commit 17d339ea8e73a6f1fddb20306b55ee34512c7364 1 parent 28ab88e
@timhunt timhunt authored
View
4 mod/quiz/report/overview/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;
}
View
4 mod/quiz/report/responses/report.php
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.