Skip to content

Commit

Permalink
removing old broken sql
Browse files Browse the repository at this point in the history
  • Loading branch information
toyomoyo committed Aug 17, 2007
1 parent 66b079a commit 54c7e5e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions grade/report/grader/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,21 +798,6 @@ function get_avghtml($grouponly=false) {
}

if ($showaverages) {
/*
* this sql is broken in the event of multiple grade book roles assigned to one user
* or same role in multiple contexts
$SQL = "SELECT g.itemid, SUM(g.finalgrade) as sum, COUNT(DISTINCT(u.id)) as count
FROM {$CFG->prefix}grade_items gi LEFT JOIN
{$CFG->prefix}grade_grades g ON gi.id = g.itemid LEFT JOIN
{$CFG->prefix}user u ON u.id = g.userid LEFT JOIN
{$CFG->prefix}role_assignments ra ON u.id = ra.userid
$groupsql
WHERE gi.courseid = $this->courseid
$groupwheresql
AND ra.roleid in ($this->gradebookroles)
AND ra.contextid ".get_related_contexts_string($this->context)."
GROUP BY g.itemid";
*/

// the first join on user is needed for groupsql
$SQL = "SELECT g.itemid, SUM(g.finalgrade) as sum, COUNT(DISTINCT(u.id)) as count
Expand Down

0 comments on commit 54c7e5e

Please sign in to comment.