diff --git a/admin/index.php b/admin/index.php index 90d5307ecb7..33786fc3af6 100644 --- a/admin/index.php +++ b/admin/index.php @@ -937,6 +937,13 @@ $result = new environment_results('custom_checks'); $result = check_xmlrpc_usage($result); $xmlrpcwarning = !is_null($result) ? get_string($result->getFeedbackStr(), 'admin') : ''; +// Check whether MoodleNet features are enabled and warn about removal. +$moodlenetwarning = ''; +$moodlenetenabled = get_config('tool_moodlenet', 'enablemoodlenet'); +if ($moodlenetenabled) { + $moodlenetwarning = get_string('moodlenetremovalwarning', 'admin'); +} + admin_externalpage_setup('adminnotifications'); $output = $PAGE->get_renderer('core', 'admin'); @@ -946,4 +953,4 @@ echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisp $registered, $cachewarnings, $eventshandlers, $themedesignermode, $devlibdir, $mobileconfigured, $overridetossl, $invalidforgottenpasswordurl, $croninfrequent, $showcampaigncontent, $showfeedbackencouragement, $servicesandsupportcontent, - $xmlrpcwarning); + $xmlrpcwarning, $moodlenetwarning); diff --git a/admin/renderer.php b/admin/renderer.php index 93c4943db9c..57873da1b8c 100644 --- a/admin/renderer.php +++ b/admin/renderer.php @@ -279,6 +279,7 @@ class core_admin_renderer extends plugin_renderer_base { * @param bool $showfeedbackencouragement Whether the feedback encouragement content should be displayed or not. * @param bool $showservicesandsupport Whether the services and support content should be displayed or not. * @param string $xmlrpcwarning XML-RPC deprecation warning message. + * @param string $moodlenetwarning MoodleNet removal warning message. * * @return string HTML to output. */ @@ -288,7 +289,7 @@ class core_admin_renderer extends plugin_renderer_base { $themedesignermode = false, $devlibdir = false, $mobileconfigured = false, $overridetossl = false, $invalidforgottenpasswordurl = false, $croninfrequent = false, $showcampaigncontent = false, bool $showfeedbackencouragement = false, bool $showservicesandsupport = false, - $xmlrpcwarning = '') { + $xmlrpcwarning = '', $moodlenetwarning = '') { global $CFG; $output = ''; @@ -313,6 +314,7 @@ class core_admin_renderer extends plugin_renderer_base { $output .= $this->mobile_configuration_warning($mobileconfigured); $output .= $this->forgotten_password_url_warning($invalidforgottenpasswordurl); $output .= $this->mnet_deprecation_warning($xmlrpcwarning); + $output .= $this->moodlenet_removal_warning($moodlenetwarning); $output .= $this->userfeedback_encouragement($showfeedbackencouragement); $output .= $this->services_and_support_content($showservicesandsupport); $output .= $this->campaign_content($showcampaigncontent); @@ -2326,6 +2328,20 @@ class core_admin_renderer extends plugin_renderer_base { return $this->warning($xmlrpcwarning); } + /** + * Display a warning about the removal of MoodleNet integration. + * + * @param string $moodlenetwarning The warning message + * @return string HTML to output. + */ + protected function moodlenet_removal_warning($moodlenetwarning) { + if (empty($moodlenetwarning)) { + return ''; + } + + return $this->warning($moodlenetwarning); + } + /** * Renders the theme selector list. * diff --git a/admin/tool/moodlenet/lang/en/tool_moodlenet.php b/admin/tool/moodlenet/lang/en/tool_moodlenet.php index 0e8ea8a0504..5c419a3b392 100644 --- a/admin/tool/moodlenet/lang/en/tool_moodlenet.php +++ b/admin/tool/moodlenet/lang/en/tool_moodlenet.php @@ -38,6 +38,9 @@ $string['defaultmoodlenet_desc'] = 'The URL of the MoodleNet instance available $string['defaultmoodlenetname'] = "MoodleNet instance name"; $string['defaultmoodlenetnamevalue'] = 'MoodleNet Central'; $string['defaultmoodlenetname_desc'] = 'The name of the MoodleNet instance available via the activity chooser.'; +$string['removalwarning_feature'] = 'If you need to continue using MoodleNet, contact your site administrator about setting up a self-hosted MoodleNet instance.'; +$string['removalwarning_service'] = 'After the date, you will no longer be able to browse or add content from MoodleNet Central.'; +$string['removalwarning_title'] = 'The MoodleNet service will be shut down on 20 April 2026.'; $string['enablemoodlenet'] = 'Enable MoodleNet integration (inbound)'; $string['enablemoodlenet_desc'] = 'If enabled, a user with the capability to create and manage activities can browse MoodleNet via the activity chooser and import MoodleNet resources into their course. In addition, a user with the capability to restore backups can select a backup file on MoodleNet and restore it into Moodle.'; $string['errorduringdownload'] = 'An error occurred while downloading the file: {$a}'; diff --git a/admin/tool/moodlenet/templates/chooser_moodlenet.mustache b/admin/tool/moodlenet/templates/chooser_moodlenet.mustache index a812e5402cd..a2b37b5cfd5 100644 --- a/admin/tool/moodlenet/templates/chooser_moodlenet.mustache +++ b/admin/tool/moodlenet/templates/chooser_moodlenet.mustache @@ -27,8 +27,16 @@
{{#str}} instancedescription, tool_moodlenet {{/str}}
+ + {{! Removal warning - always visible when MoodleNet integration is enabled }} +{{#str}}removalwarning_service, tool_moodlenet{{/str}}
+{{#str}}removalwarning_feature, tool_moodlenet{{/str}}
+{{#str}} connectandbrowse, tool_moodlenet {{/str}}
Branded Moodle app with your own custom branding.'; +$string['moodlenetremovalwarning'] = 'The MoodleNet service will be shut down on 20 April 2026. If you wish to continue using MoodleNet on your site, install the MoodleNet plugin from the Moodle plugins directory and connect it to a self-hosted MoodleNet instance. Following this, the MoodleNet profile ID field will be removed; please migrate that data if you are using it for other purposes.'; $string['noreplyaddress'] = 'No-reply address'; $string['noreplydomain'] = 'No-reply and domain'; $string['noreplydomaindetail'] = 'Settings for No-reply and configured domains';