diff --git a/classes/local/hook_callbacks.php b/classes/local/hook_callbacks.php index 91121f2..c07e204 100644 --- a/classes/local/hook_callbacks.php +++ b/classes/local/hook_callbacks.php @@ -50,6 +50,11 @@ class hook_callbacks { public static function inject_backlinks_into_activity_header(before_http_headers $beforehttpheadershook): void { global $OUTPUT, $PAGE; + // Don't run during initial install. + if (during_initial_install()) { + return; + } + if (get_config('mod_learningmap', 'backlinkallowed') == 0) { return; }