Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-16785 bogus grades inserted when formulas used - credit Michael S…

…pall and Ann Adamcik
  • Loading branch information...
commit 6e91016520352ff0a7d072dbf1d3672c91316a1f 1 parent 20c30ac
skodak authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/grade/grade_item.php
View
2  lib/grade/grade_item.php
@@ -1616,7 +1616,7 @@ function compute($userid=null) {
$sql = "SELECT DISTINCT go.userid
FROM {$CFG->prefix}grade_grades go
JOIN {$CFG->prefix}grade_items gi
- ON gi.id = go.itemid
+ ON (gi.id = go.itemid AND gi.courseid={$this->courseid})
LEFT OUTER JOIN {$CFG->prefix}grade_grades g
ON (g.userid = go.userid AND g.itemid = $this->id)
WHERE gi.id <> $this->id AND g.id IS NULL";
Please sign in to comment.
Something went wrong with that request. Please try again.