MDL-17055 fixed pg regression - removed redundant sorting

This commit is contained in:
skodak
2008-10-29 07:16:49 +00:00
parent 10e99feaa2
commit 5f772e4afa
+7 -4
View File
@@ -531,10 +531,13 @@
// of rows anyway. On a large course it will explode badly...
//
if ($mode===MODE_ENROLDETAILS) {
$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);
if ($context->id != $frontpagectx->id) {
$userids = $DB->get_fieldset_sql("SELECT DISTINCT u.id $from $where $wheresearch", $params,
$table->get_page_start(), $table->get_page_size());
} else {
$userids = $DB->get_fieldset_sql("SELECT u.id $from $where $wheresearch", $params,
$table->get_page_start(), $table->get_page_size());
}
$userlist_extra = get_participants_extra($userids, $avoidroles, $course, $context);
}