Merge branch 'MDL-80458-403' of https://github.com/mickhawkins/moodle into MOODLE_403_STABLE

This commit is contained in:
Sara Arjona
2024-01-24 17:15:00 +01:00
@@ -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',