From 1764defb5a1d71691b500faeaae4cebbb1f47b22 Mon Sep 17 00:00:00 2001 From: Ed Basset Date: Mon, 21 May 2018 12:15:26 +0200 Subject: [PATCH] MDL-36424 wiki: set group so subwiki tabs/pages display correctly --- mod/wiki/view.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/wiki/view.php b/mod/wiki/view.php index 2406c031571..423d8c296d2 100644 --- a/mod/wiki/view.php +++ b/mod/wiki/view.php @@ -177,6 +177,10 @@ if ($id) { $groupmode = groups_get_activity_groupmode($cm); + // This is where people will land when they change groups using the drop-down selector. + // Set the activity group so tabs and content are shown correctly. + $currentgroup = groups_get_activity_group($cm, true); + if ($wiki->wikimode == 'individual' && ($groupmode == SEPARATEGROUPS || $groupmode == VISIBLEGROUPS)) { list($gid, $uid) = explode('-', $groupanduser); } else if ($wiki->wikimode == 'individual') {