diff --git a/calendar/lib.php b/calendar/lib.php index 6a67dea3851..975da295d5b 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -654,7 +654,7 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL) { $getvars = '&from='.$type; break; case 'course': - if (isset_param('id')) { + if ($id > 0) { $getvars = '&from=course&id='.$id; } else { $getvars = '&from=course'; diff --git a/mod/forum/view.php b/mod/forum/view.php index 94afe312a97..ff2018e9689 100644 --- a/mod/forum/view.php +++ b/mod/forum/view.php @@ -8,7 +8,7 @@ $f = optional_param('f', 0, PARAM_INT); // Forum ID $mode = optional_param('mode', 0, PARAM_INT); // Display mode (for single forum) $showall = optional_param('showall', '', PARAM_INT); // show all discussions on one page - $group = optional_param('group', -1, PARAM_INT); // choose the current group + $changegroup = optional_param('group', -1, PARAM_INT); // choose the current group $page = optional_param('page', 0, PARAM_INT); // which page to show $search = optional_param('search', ''); // search string @@ -83,8 +83,6 @@ /// Check to see if groups are being used in this forum /// and if so, set $currentgroup to reflect the current group - $changegroup = isset_param('group') ? $group : -1; // Group change requested? - if ($forum->type == "teacher") { $groupmode = NOGROUPS; } else {