Permalink
Browse files

MDL-35698 quiz cron: group overrides not computed correctly

Thanks to Matt Petro for finding the bug in this monster SQL statement.
  • Loading branch information...
1 parent 9273bd1 commit 2d04a1fe31f7c199d52f8f03e8247236c54ae5e2 @timhunt timhunt committed Sep 29, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/quiz/cronlib.php
View
@@ -117,8 +117,8 @@ protected function get_list_of_overdue_attempts($processfrom, $processto) {
FROM {quiz_attempts} iquiza
JOIN {quiz} quiz ON quiz.id = iquiza.quiz
LEFT JOIN {quiz_overrides} quo ON quo.quiz = quiz.id AND quo.userid = iquiza.userid
- LEFT JOIN {quiz_overrides} qgo ON qgo.quiz = quiz.id
- LEFT JOIN {groups_members} gm ON gm.userid = iquiza.userid AND gm.groupid = qgo.groupid
+ LEFT JOIN {groups_members} gm ON gm.userid = iquiza.userid
+ LEFT JOIN {quiz_overrides} qgo ON qgo.quiz = quiz.id AND qgo.groupid = gm.groupid
WHERE iquiza.state IN ('inprogress', 'overdue')
AND iquiza.timemodified >= :processfrom

0 comments on commit 2d04a1f

Please sign in to comment.