]> git.mjollnir.org Git - moodle.git/commitdiff
user/index: Fix Participants page for sitecourse - MDL-12311
authormartinlanghoff <martinlanghoff>
Fri, 23 Nov 2007 00:23:10 +0000 (00:23 +0000)
committermartinlanghoff <martinlanghoff>
Fri, 23 Nov 2007 00:23:10 +0000 (00:23 +0000)
Groups/groupings don't seem to map normally through enrolments
as you would expect with site. Disable for sitecourse.

user/index.php

index 8293328951d6cb15999e588f87e483e2205f7f5c..43f2aeda2ab1276c422fbbd23202817eb0942651 100644 (file)
     // and $USER can enrol/unenrol, display extra enrolments & groups information.
     // (will take 1 extra DB query - 2 on Oracle)
     //
-    if ($fullmode === false &&
-        $perpage <= DEFAULT_PAGE_SIZE && has_capability('moodle/role:assign',$context)) {
+    if ($fullmode === false              && $course->id != SITEID
+        && $perpage <= DEFAULT_PAGE_SIZE && has_capability('moodle/role:assign',$context)) {
         $showenroldata = true;
     } else {
         $showenroldata = false;