Skip to content

Commit

Permalink
Fixed some notices but this needs review from Petr MDL-10383
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Oct 3, 2007
1 parent af5c201 commit e873679
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/grouplib.php
Expand Up @@ -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';
}
Expand All @@ -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
Expand Down

0 comments on commit e873679

Please sign in to comment.