From 5d14c00774ee9fd3d6847bc03175c88f35e55165 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 19 Jan 2016 11:24:12 +0100 Subject: [PATCH] MDL-52993 wiki: Fix wiki_user_can_edit for collab and separate groups --- mod/wiki/locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/wiki/locallib.php b/mod/wiki/locallib.php index 9a085a4cdef..7e8411ae4d0 100644 --- a/mod/wiki/locallib.php +++ b/mod/wiki/locallib.php @@ -908,7 +908,7 @@ function wiki_user_can_edit($subwiki) { // There is one wiki per group. // // Only members of subwiki group could edit that wiki - if ($subwiki->groupid == groups_get_activity_group($cm)) { + if (groups_is_member($subwiki->groupid)) { // Only edit capability needed return has_capability('mod/wiki:editpage', $context); } else { // User is not part of that group