Permalink
Browse files

MDL-37165 Assignment: Oracle fix for count_submissions_with_status (a…

…nd friends).

Oracle does not like the use of AS after a join.
  • Loading branch information...
1 parent 271bfb4 commit 63fd639d854859c138e580e14c5736559bbad0f8 @damyon damyon committed Dec 14, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 mod/assign/locallib.php
View
@@ -1074,7 +1074,7 @@ public function count_submissions_need_grading() {
LEFT JOIN {assign_grades} g ON
s.assignment = g.assignment AND
s.userid = g.userid
- JOIN(' . $esql . ') AS e ON e.id = s.userid
+ JOIN(' . $esql . ') e ON e.id = s.userid
WHERE
s.assignment = :assignid AND
s.timemodified IS NOT NULL AND
@@ -1104,7 +1104,7 @@ public function count_submissions_with_status($status) {
LEFT JOIN {assign_grades} g ON
s.assignment = g.assignment AND
s.userid = g.userid
- JOIN(' . $esql . ') AS e ON e.id = s.userid
+ JOIN(' . $esql . ') e ON e.id = s.userid
WHERE
s.assignment = :assignid AND
s.timemodified IS NOT NULL AND
@@ -1173,7 +1173,7 @@ private function get_all_submissions( $sort="", $dir="DESC") {
$sql = 'SELECT s.*, u.lastname, u.firstname, u.username
FROM {assign_submission} s
JOIN {user} u ON s.userid = u.id
- JOIN(' . $esql . ') AS e ON e.id = s.userid
+ JOIN(' . $esql . ') e ON e.id = s.userid
WHERE
s.assignment = :assignid AND
s.timemodified IS NOT NULL';

0 comments on commit 63fd639

Please sign in to comment.