Skip to content

Commit

Permalink
general MDL-26440 removed references to uid in SQL queries as its a r…
Browse files Browse the repository at this point in the history
…eserved word in Oracle
  • Loading branch information
andyjdavis committed Feb 18, 2011
1 parent 99faefb commit 7bbe971
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/overrides.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
}
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 = ?
Expand Down
2 changes: 1 addition & 1 deletion rating/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
//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>";
Expand Down
2 changes: 1 addition & 1 deletion rating/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function get_all_ratings_for_item($options) {
$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
Expand Down

0 comments on commit 7bbe971

Please sign in to comment.