]> git.mjollnir.org Git - moodle.git/commitdiff
removing old broken sql
authortoyomoyo <toyomoyo>
Fri, 17 Aug 2007 06:15:35 +0000 (06:15 +0000)
committertoyomoyo <toyomoyo>
Fri, 17 Aug 2007 06:15:35 +0000 (06:15 +0000)
grade/report/grader/lib.php

index b4333d3aa0238f02fe98ba3e5cba919aa73471ff..7a62425784a11d55139ff35b88c212548ac170de 100644 (file)
@@ -798,21 +798,6 @@ class grade_report_grader extends grade_report {
         }
 
         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