Skip to content

Commit

Permalink
MDL-82297 core: Add notification to warn admins
Browse files Browse the repository at this point in the history
* In Moodle 5.0 we will remove Chat and Survey module
and we will need to announce it beforehand
  • Loading branch information
laurentdavid committed Jul 16, 2024
1 parent 593b02b commit dc4f464
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions admin/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ public function admin_notifications_page($maturity, $insecuredataroot, $errorsdi

$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);
Expand Down Expand Up @@ -754,6 +755,21 @@ protected function moodle_copyright() {
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')
);
}

/**
* Display a warning about installing development code if necesary.
* @param int $maturity
Expand All @@ -776,6 +792,7 @@ protected function maturity_info($maturity) {
return $this->warning($warningtext, $level);
}


/**
* Displays the info about available Moodle core and plugin updates
*
Expand Down
5 changes: 5 additions & 0 deletions lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,11 @@
$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';
Expand Down

0 comments on commit dc4f464

Please sign in to comment.