diff --git a/blocks/microsoft/block_microsoft.php b/blocks/microsoft/block_microsoft.php index 0e9a8db4a..b3f2d94f9 100644 --- a/blocks/microsoft/block_microsoft.php +++ b/blocks/microsoft/block_microsoft.php @@ -71,7 +71,7 @@ public function get_content() { $items = []; - if ($PAGE->context instanceof \context_course) { + if ($PAGE->context instanceof \context_course && $PAGE->context->instanceid !== SITEID) { if (!empty($o365config->sharepointlink)) { $courserec = $DB->get_record('course', ['id' => $PAGE->context->instanceid]); if (!empty($courserec)) {