MDL-61365 group: Fix default filter when group mode is visible
authorSara Arjona <sara@moodle.com>
Wed, 7 Feb 2018 17:02:56 +0000 (18:02 +0100)
committerSara Arjona <sara@moodle.com>
Wed, 7 Feb 2018 17:02:56 +0000 (18:02 +0100)
user/index.php

index aed9016..993d511 100644 (file)
@@ -178,9 +178,8 @@ foreach ($filtersapplied as $filter) {
             break;
     }
 }
-
 // If course supports groups we may need to set a default.
-if ($groupid !== false) {
+if (!empty($groupid)) {
     if ($canaccessallgroups) {
         // User can access all groups, let them filter by whatever was selected.
         $filtersapplied[] = USER_FILTER_GROUP . ':' . $groupid;