Permalink
Browse files

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

  • Loading branch information...
1 parent 1115bb3 commit 23288150aa4d1ec16ca154d1517506383481f221 @deraadt deraadt committed with ankitagarwal Oct 29, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/assign/locallib.php
View
4 mod/assign/locallib.php
@@ -1517,8 +1517,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 2328815

Please sign in to comment.