mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-80458 core: Hide MoodleNet share bulk option if feature disabled
This commit is contained in:
parent
580c009cac
commit
d1d85aa711
@ -83,7 +83,7 @@ class bulkedittools implements named_templatable, renderable {
|
||||
* @return array of edit control items
|
||||
*/
|
||||
protected function cm_control_items(): array {
|
||||
global $USER;
|
||||
global $CFG, $USER;
|
||||
$format = $this->format;
|
||||
$context = $format->get_context();
|
||||
$user = $USER;
|
||||
@ -133,7 +133,7 @@ class bulkedittools implements named_templatable, renderable {
|
||||
}
|
||||
|
||||
$usercanshare = utilities::can_user_share($context, $user->id, 'course');
|
||||
if ($usercanshare) {
|
||||
if ($CFG->enablesharingtomoodlenet && $usercanshare) {
|
||||
$controls['sharetomoodlenet'] = [
|
||||
'id' => 'cmShareToMoodleNet',
|
||||
'icon' => 'i/share',
|
||||
|
Loading…
x
Reference in New Issue
Block a user