From e873679b8a89b2081054124daaa87b8416ea2af7 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 3 Oct 2007 09:12:01 +0000 Subject: [PATCH] Fixed some notices but this needs review from Petr MDL-10383 --- lib/grouplib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/grouplib.php b/lib/grouplib.php index f85b9685b9..8f9ca2487b 100644 --- a/lib/grouplib.php +++ b/lib/grouplib.php @@ -422,7 +422,7 @@ function groups_get_course_group($course, $update=false) { $SESSION->activegroup[$course->id] = array(SEPARATEGROUPS=>array(), VISIBLEGROUPS=>array(), 'aag'=>array()); } - $context = get_context_instance(CONTEXT_MODULE, $cm->id); + $context = get_context_instance(CONTEXT_COURSE, $course->id); if (has_capability('moodle/site:accessallgroups', $context)) { $groupmode = 'aag'; } @@ -446,7 +446,6 @@ function groups_get_course_group($course, $update=false) { // set new active group if requested $changegroup = optional_param('group', -1, PARAM_INT); if ($update and $changegroup != -1) { - $context = get_context_instance(CONTEXT_COURSE, $course->id); if ($changegroup == 0) { // do not allow changing to all groups without accessallgroups capability -- 2.39.5