]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some SQL error
authormoodler <moodler>
Fri, 15 Sep 2006 13:42:40 +0000 (13:42 +0000)
committermoodler <moodler>
Fri, 15 Sep 2006 13:42:40 +0000 (13:42 +0000)
lib/accesslib.php

index cf42c8142cfa2ba951a8b177e369839af1afcd55..0986592dfa1c2a18f23c005734712091dd8ab002 100755 (executable)
@@ -2312,12 +2312,14 @@ function get_users_by_capability($context, $capability, $fields='u.*, ul.timeacc
     /// sorting out exceptions
     if ($exceptions) {
         $exceptionsql = "AND u.id NOT IN ($exceptions)";
+    } else {
+        $exceptionsql = '';
     }
     
-    /// if context is a course, then constrct sql for ul
+    /// if context is a course, then construct sql for ul
     if ($context->aggregatelevel == CONTEXT_COURSE) {
         $courseid = $context->instanceid;
-        $coursesql = "AND (ul.courseid = $courseid OR ISNULL(ul.courseid)";
+        $coursesql = "AND (ul.courseid = $courseid OR ISNULL(ul.courseid))";
     }
     
     /// sorting out roles with this capability set