From 7e4fdf25159ec928f470ee65e0f7bc013cadd7a1 Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 20 Aug 2007 14:20:36 +0000 Subject: [PATCH] MDL-10383 - some more disabling of groupingid's when $CFG->enablegroupings empty - adding some explanation comments --- lib/grouplib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/grouplib.php b/lib/grouplib.php index 34c50f90e5..4f3cae8eb5 100644 --- a/lib/grouplib.php +++ b/lib/grouplib.php @@ -83,6 +83,7 @@ function groups_get_group($groupid) { function groups_get_all_groups($courseid, $userid=0, $groupingid=0) { global $CFG; + // groupings are ignored when not enabled if (empty($CFG->enablegroupings)) { $groupingid = 0; } @@ -136,6 +137,7 @@ function groups_is_member($groupid, $userid=null) { function groups_has_membership($cm, $userid=null) { global $CFG, $USER; + // groupings are ignored when not enabled if (empty($CFG->enablegroupings)) { $cm->groupingid = 0; } @@ -206,6 +208,7 @@ function groups_get_activity_groupmode($cm) { function groups_print_activity_menu($cm, $urlroot, $return=false) { global $CFG, $USER; + // groupings are ignored when not enabled if (empty($CFG->enablegroupings)) { $cm->groupingid = 0; } @@ -270,6 +273,7 @@ function groups_print_activity_menu($cm, $urlroot, $return=false) { function groups_get_activity_group($cm, $update=false) { global $CFG, $USER, $SESSION; + // groupings are ignored when not enabled if (empty($CFG->enablegroupings)) { $cm->groupingid = 0; } -- 2.39.5