From 65c0de3618a0c8d9f026c72a161ac126697944ad Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 7 Sep 2023 16:55:19 +0100 Subject: [PATCH] MDL-78619 communication: add customlink to list of standard plugins. Make management URL nullable to avoid section link error when the whole subsystem is not enabled. --- lib/classes/plugin_manager.php | 1 + lib/classes/plugininfo/communication.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/classes/plugin_manager.php b/lib/classes/plugin_manager.php index f322a21796352..6acdf85c850d3 100644 --- a/lib/classes/plugin_manager.php +++ b/lib/classes/plugin_manager.php @@ -1826,6 +1826,7 @@ public static function standard_plugins_list($type) { ), 'communication' => [ + 'customlink', 'matrix', ], diff --git a/lib/classes/plugininfo/communication.php b/lib/classes/plugininfo/communication.php index 93171be638f9e..3c25e618b7464 100644 --- a/lib/classes/plugininfo/communication.php +++ b/lib/classes/plugininfo/communication.php @@ -29,7 +29,11 @@ */ class communication extends base { - public static function get_manage_url(): moodle_url { + public static function get_manage_url(): ?moodle_url { + if (!\core_communication\api::is_available()) { + return null; + } + return new moodle_url('/admin/settings.php', ['section' => 'managecommunicationproviders']); }