Merge branch 'MDL-26440_uid' of git://github.com/andyjdavis/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 22 Feb 2011 09:27:38 +0000 (10:27 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 22 Feb 2011 09:27:38 +0000 (10:27 +0100)
mod/quiz/overrides.php
rating/index.php
rating/lib.php

index 0535793..5f5c6da 100644 (file)
@@ -98,7 +98,7 @@ if ($groupmode) {
 }
 else {
     $colname = get_string('user');
-    $sql = 'SELECT o.*, u.firstname, u.lastname, u.id as uid
+    $sql = 'SELECT o.*, u.firstname, u.lastname
                 FROM {quiz_overrides} o JOIN {user} u
                 ON o.userid = u.id
                 WHERE o.quiz = ?
index 41d085e..50a63be 100644 (file)
@@ -97,7 +97,7 @@ if (!$ratings) {
         //Undo the aliasing of the user id column from user_picture::fields()
         //we could clone the rating object or preserve the rating id if we needed it again
         //but we don't
-        $rating->id = $rating->uid;
+        $rating->id = $rating->userid;
 
         echo '<tr class="ratingitemheader">';
         echo "<td>";
index b53abf2..29313e2 100644 (file)
@@ -217,7 +217,7 @@ class rating_manager {
             $sortclause = "ORDER BY $options->sort";
         }
 
-        $userfields = user_picture::fields('u', null, 'uid');
+        $userfields = user_picture::fields('u', null, 'userid');
         $sql = "SELECT r.id, r.rating, r.itemid, r.userid, r.timemodified, $userfields
                 FROM {rating} r
                 LEFT JOIN {user} u ON r.userid = u.id