Merge branch 'MDL-59824-master' of git://github.com/damyon/moodle
This commit is contained in:
@@ -58,7 +58,7 @@ class user_groups_editable extends \core\output\inplace_editable {
|
||||
*/
|
||||
public function __construct($course, $context, $user, $coursegroups, $value) {
|
||||
// Check capabilities to get editable value.
|
||||
$editable = has_capability('moodle/course:managegroups', $context);
|
||||
$editable = has_capability('moodle/course:managegroups', $context) && !empty($coursegroups);
|
||||
|
||||
// Invent an itemid.
|
||||
$itemid = $course->id . ':' . $user->id;
|
||||
|
||||
Reference in New Issue
Block a user