Permalink
Browse files

completion MDL-25929 Reordered SQL to make it clearer (after tim's re…

…view)
  • Loading branch information...
1 parent 1c6ed50 commit b64a827c4de980bba34e38c9478ef6dfa4f8d22d @sammarshallou sammarshallou committed Jan 10, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 course/user.php
View
@@ -366,15 +366,15 @@
INNER JOIN
{context} con
ON con.instanceid = c.id
+ INNER JOIN
+ {role_assignments} ra
+ ON ra.contextid = con.id
INNER JOIN
{enrol} e
ON c.id = e.courseid
INNER JOIN
{user_enrolments} ue
- ON e.id = ue.enrolid
- INNER JOIN
- {role_assignments} ra
- ON ra.contextid = con.id AND ra.userid=ue.userid
+ ON e.id = ue.enrolid AND ra.userid = ue.userid
AND ra.userid = {$user->id}
";

0 comments on commit b64a827

Please sign in to comment.