]> git.mjollnir.org Git - moodle.git/commitdiff
participants list: MDL-17055 temporary fix for this regression. Do the DISTINCT bit...
authortjhunt <tjhunt>
Wed, 29 Oct 2008 01:33:26 +0000 (01:33 +0000)
committertjhunt <tjhunt>
Wed, 29 Oct 2008 01:33:26 +0000 (01:33 +0000)
user/index.php

index 071332451182d8d476316cc727a22218fe7ce49b..be7ce7db255c53a269608d5370750d7b50ea9ef1 100644 (file)
     // of rows anyway. On a large course it will explode badly...
     //
     if ($mode===MODE_ENROLDETAILS) {
-        if ($context->id != $frontpagectx->id) {
-            $userids = $DB->get_fieldset_sql("SELECT DISTINCT u.id $from $where $wheresearch $sort", $params,
-                                             $table->get_page_start(),  $table->get_page_size());
-        } else {
-            $userids = $DB->get_fieldset_sql("SELECT u.id $from $where $wheresearch $sort", $params,
-                                             $table->get_page_start(),  $table->get_page_size());
-        }
+        $userids = $DB->get_fieldset_sql("SELECT u.id $from $where $wheresearch $sort", $params,
+                                         $table->get_page_start(),  $table->get_page_size());
+        $userids = array_unique($userids);
+
         $userlist_extra = get_participants_extra($userids, $avoidroles, $course, $context);
     }