From c584346cd51606059d7ee30d6889efff2bc35bf1 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 1 May 2008 22:32:15 +0000 Subject: [PATCH] MDL-14617 removed some legacy group code - fixed regression --- lib/deprecatedlib.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 7be45bf4e2..d90c4f275c 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -797,6 +797,22 @@ function groupmode($course, $cm=null) { return $course->groupmode; } +/** + * Sets the current group in the session variable + * When $SESSION->currentgroup[$courseid] is set to 0 it means, show all groups. + * Sets currentgroup[$courseid] in the session variable appropriately. + * Does not do any permission checking. + * @uses $SESSION + * @param int $courseid The course being examined - relates to id field in + * 'course' table. + * @param int $groupid The group being examined. + * @return int Current group id which was set by this function + */ +function set_current_group($courseid, $groupid) { + global $SESSION; + return $SESSION->currentgroup[$courseid] = $groupid; +} + /** * Gets the current group - either from the session variable or from the database. -- 2.39.5