MDL-52993 wiki: Fix wiki_user_can_edit for collab and separate groups
authorDani Palou <dani@moodle.com>
Tue, 19 Jan 2016 10:24:12 +0000 (11:24 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 16 Feb 2016 15:44:07 +0000 (16:44 +0100)
mod/wiki/locallib.php

index f19d462..2ddbb83 100644 (file)
@@ -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