Permalink
Browse files

MDL-41092 assign: Fix duplicate key error in assign cron

  • Loading branch information...
1 parent 68291f2 commit 9f3da4079a257c3566325c795bdf109545c68007 @deraadt deraadt committed with ankitagarwal Oct 29, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/assign/locallib.php
View
@@ -1560,8 +1560,8 @@ public static function cron() {
$timenow = time();
// Collect all submissions from the past 24 hours that require mailing.
- $sql = 'SELECT a.course, a.name, a.blindmarking, a.revealidentities,
- g.*, g.id as gradeid, g.timemodified as lastmodified
+ $sql = 'SELECT g.id as gradeid, a.course, a.name, a.blindmarking, a.revealidentities,
+ g.*, g.timemodified as lastmodified
FROM {assign} a
JOIN {assign_grades} g ON g.assignment = a.id
LEFT JOIN {assign_user_flags} uf ON uf.assignment = a.id AND uf.userid = g.userid

0 comments on commit 9f3da40

Please sign in to comment.