Index: lib.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/wiki/lib.php,v retrieving revision 1.53.2.8 diff -u -r1.53.2.8 lib.php --- lib.php 19 Nov 2009 10:42:58 -0000 1.53.2.8 +++ lib.php 16 Jan 2010 00:14:19 -0000 @@ -989,11 +989,13 @@ else if ($groupid == 0) { return ($mygroupid != 0 and wiki_is_teacher($wiki)); } - /// If there is a group mode, non-editing teachers with an assigned group, can only create wikis - /// in their group. Non-editing teachers with no assigned group and editing teachers can create any wiki. + /// If requesting a group, must be an editing teacher, a non-editing teacher with no assigned group, + /// or a non-editing teacher requesting their group. or a student in group, but wiki is empty. else { return (wiki_is_teacheredit($wiki) or - (wiki_is_teacher($wiki) and ($mygroupid == 0 or @in_array($groupid, $mygroupid)))); + (wiki_is_teacher($wiki) and ($mygroupid == 0 or @in_array($groupid, $mygroupid))) or + (wiki_is_student($wiki, $user->id) and @in_array($groupid, $mygroupid)) + ); } break; }