Skip to content

Commit

Permalink
MDL-80458 core: Hide MoodleNet share bulk option if feature disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhawkins committed Jan 24, 2024
1 parent 580c009 commit d1d85aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions course/format/classes/output/local/content/bulkedittools.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function get_toolbar_actions(): array {
* @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;
Expand Down Expand Up @@ -133,7 +133,7 @@ protected function cm_control_items(): array {
}

$usercanshare = utilities::can_user_share($context, $user->id, 'course');
if ($usercanshare) {
if ($CFG->enablesharingtomoodlenet && $usercanshare) {
$controls['sharetomoodlenet'] = [
'id' => 'cmShareToMoodleNet',
'icon' => 'i/share',
Expand Down

0 comments on commit d1d85aa

Please sign in to comment.