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 22, 2024
1 parent 90e10f3 commit 4004455
Show file tree
Hide file tree
Showing 5 changed files with 37 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,22 @@ 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'),
true
);
}

/**
* Display a warning about installing development code if necesary.
* @param int $maturity
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
5 changes: 5 additions & 0 deletions theme/boost/scss/moodle/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 5 additions & 0 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -26830,6 +26830,11 @@ body.behat-site .action-menu .dropdown-subpanel-content.show {
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;
Expand Down
5 changes: 5 additions & 0 deletions theme/classic/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -26830,6 +26830,11 @@ body.behat-site .action-menu .dropdown-subpanel-content.show {
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;
Expand Down

0 comments on commit 4004455

Please sign in to comment.