MDL-82297 core: Add notification to warn admins

* In Moodle 5.0 we will remove Chat and Survey module
and we will need to announce it beforehand
This commit is contained in:
Laurent David
2024-08-26 14:49:02 +02:00
parent 29b2bfe51f
commit fbbf8715ef
5 changed files with 37 additions and 0 deletions
+17
View File
@@ -295,6 +295,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->header();
$output .= $this->output->heading(get_string('notifications', 'admin'));
$output .= $this->upgrade_news_message();
$output .= $this->maturity_info($maturity);
$output .= empty($CFG->disableupdatenotifications) ? $this->available_updates($availableupdates, $availableupdatesfetch) : '';
$output .= $this->insecure_dataroot_warning($insecuredataroot);
@@ -754,6 +755,22 @@ class core_admin_renderer extends plugin_renderer_base {
return $this->box($copyrighttext, 'copyright');
}
/**
* Display a transient notification for important upgrades messages for
* specific releases.
*
* @return string HTML to output.
*/
protected function upgrade_news_message() {
return $this->notification(
get_string('importantupdates_content', 'admin'),
'info',
false,
get_string('importantupdates_title', 'admin'),
'i/circleinfo, core'
);
}
/**
* Display a warning about installing development code if necesary.
* @param int $maturity
+5
View File
@@ -762,6 +762,11 @@ $string['taskh5pcleanup'] = 'Unused H5P files cleanup';
$string['iconvrequired'] = 'Installing ICONV extension is required.';
$string['igbinary322buggyversion'] = 'The php-igbinary extension installed on the site can lead to problems when running with PHP 7.2. You are recommended to either upgrade to php-igbinary 3.2.5 or later, or alternatively to upgrade to PHP 7.3 or later.';
$string['ignore'] = 'Ignore';
$string['importantupdates_content'] = '<p>In the next Moodle 5.0, planned for release in April 2025, the Chat and Survey activities will
be removed from core Moodle. They will be available as plugins in the
<a href="https://moodle.org/plugins/">Moodle plugins directory</a>.</p>
<p>If you wish to continue using Chat or Survey in your site, you will be able to install them as plugins before upgrading to Moodle 5.0.</p>';
$string['importantupdates_title'] = 'Important update about Chat and Survey activities';
$string['includemoduleuserdata'] = 'Include module user data';
$string['incompatibleblocks'] = 'Incompatible blocks';
$string['indexdata'] = 'Index data';
+5
View File
@@ -427,6 +427,11 @@
text-align: center;
}
#page-admin-index #page-content a {
font-weight: normal;
text-decoration: underline;
}
// Plugins overview page at admin/plugins.php
#page-admin-plugins {
#plugins-overview-panel {
+5
View File
@@ -26839,6 +26839,11 @@ img.icon {
text-align: center;
}
#page-admin-index #page-content a {
font-weight: normal;
text-decoration: underline;
}
#page-admin-plugins #plugins-overview-panel .info {
display: inline-block;
margin-right: 1em;
+5
View File
@@ -26839,6 +26839,11 @@ img.icon {
text-align: center;
}
#page-admin-index #page-content a {
font-weight: normal;
text-decoration: underline;
}
#page-admin-plugins #plugins-overview-panel .info {
display: inline-block;
margin-right: 1em;