]> git.mjollnir.org Git - moodle.git/commitdiff
partially fixed group management in workshop
authorskodak <skodak>
Tue, 12 Sep 2006 21:09:43 +0000 (21:09 +0000)
committerskodak <skodak>
Tue, 12 Sep 2006 21:09:43 +0000 (21:09 +0000)
mod/workshop/lib.php

index 04d13b02290419db742217e8d4ea000326a121ed..0f0b7e9fbf058bef80c7a1d5206853da5dc41246 100644 (file)
@@ -44,10 +44,10 @@ function workshop_context($workshop) {
 function workshop_is_teacher($workshop, $userid=NULL) {
     return has_capability('mod/workshop:manage', workshop_context($workshop), $userid);
 }
-
-//TODO: should we make new role for it and fix the code or wait for new workshop? 
 function workshop_is_teacheredit($workshop, $userid=NULL) {
-    return has_capability('mod/workshop:manage', workshop_context($workshop), $userid);
+    return has_capability('mod/workshop:manage', workshop_context($workshop), $userid)
+       and has_capability('moodle/site:accessallgroups', workshop_context($workshop), $userid);
 }
 
 function workshop_is_student($workshop, $userid=NULL) {