MDL-30697 fix incorrect capability for role assign button
authorPetr Skoda <commits@skodak.org>
Sat, 17 Dec 2011 13:46:47 +0000 (14:46 +0100)
committerPetr Skoda <commits@skodak.org>
Sat, 17 Dec 2011 13:46:47 +0000 (14:46 +0100)
Credit goes to Alexander Bias.

course/lib.php

index 8a9b0d2..5c5249f 100644 (file)
@@ -3242,7 +3242,7 @@ function make_editing_buttons(stdClass $mod, $absolute = true, $moveselect = tru
     }
 
     // Assign
-    if (has_capability('moodle/course:managegroups', $modcontext)){
+    if (has_capability('moodle/role:assign', $modcontext)){
         $actions[] = new action_link(
             new moodle_url('/'.$CFG->admin.'/roles/assign.php', array('contextid' => $modcontext->id)),
             new pix_icon('i/roles', $str->assign, 'moodle', array('class' => 'iconsmall')),