MDL-49377 admin: Recommend keeping the site updated to latest version
authorDavid Mudrák <david@moodle.com>
Mon, 30 Mar 2015 21:15:54 +0000 (23:15 +0200)
committerDavid Mudrák <david@moodle.com>
Mon, 30 Mar 2015 21:15:54 +0000 (23:15 +0200)
admin/renderer.php
lang/en/admin.php
lib/classes/update/checker.php

index 26afb90..5d75e70 100644 (file)
@@ -721,6 +721,8 @@ class core_admin_renderer extends plugin_renderer_base {
                 foreach ($updates['core'] as $update) {
                     $updateinfo .= $this->moodle_available_update_info($update);
                 }
+                $updateinfo .= html_writer::tag('p', get_string('updateavailablerecommendation', 'core_admin'),
+                    array('class' => 'updateavailablerecommendation'));
             }
             unset($updates['core']);
             // If something has left in the $updates array now, it is updates for plugins.
index 5429ad4..235870b 100644 (file)
@@ -1077,6 +1077,7 @@ $string['updateavailable_release'] = 'Moodle {$a}';
 $string['updateavailable_version'] = 'Version {$a}';
 $string['updateavailableinstall'] = 'Install this update';
 $string['updateavailablenot'] = 'Your Moodle code is up-to-date!';
+$string['updateavailablerecommendation'] = 'We strongly recommend you keep your Moodle site updated to the latest version, so that you can be sure you have all our latest fixes for security issues and other bugs.';
 $string['updatenotifications'] = 'Update notifications';
 $string['updatenotificationfooter'] = 'Your Moodle site {$a->siteurl} is configured to automatically check for available updates. You are receiving this message as the administrator of the site. You can disable automatic checks for available updates in the Site administration section of the Administration block. You can customize the delivery of this message via your personal Messaging setting in the My profile settings section.';
 $string['updatenotificationsubject'] = 'Moodle updates are available ({$a->siteurl})';
index d9f207c..9b211ef 100644 (file)
@@ -754,6 +754,9 @@ class checker {
             $text .= get_string('updateavailabledetailslink', 'core_admin', $a) . PHP_EOL;
             $a = array('url' => html_writer::link($CFG->wwwroot.'/'.$CFG->admin.'/index.php', $CFG->wwwroot.'/'.$CFG->admin.'/index.php'));
             $html .= html_writer::tag('p', get_string('updateavailabledetailslink', 'core_admin', $a)) . PHP_EOL;
+
+            $text .= PHP_EOL . get_string('updateavailablerecommendation', 'core_admin') . PHP_EOL;
+            $html .= html_writer::tag('p', get_string('updateavailablerecommendation', 'core_admin')) . PHP_EOL;
         }
 
         if (!empty($pluginupdates)) {
@@ -785,7 +788,7 @@ class checker {
         }
 
         $a = array('siteurl' => $CFG->wwwroot);
-        $text .= get_string('updatenotificationfooter', 'core_admin', $a) . PHP_EOL;
+        $text .= PHP_EOL . get_string('updatenotificationfooter', 'core_admin', $a) . PHP_EOL;
         $a = array('siteurl' => html_writer::link($CFG->wwwroot, $CFG->wwwroot));
         $html .= html_writer::tag('footer', html_writer::tag('p', get_string('updatenotificationfooter', 'core_admin', $a),
             array('style' => 'font-size:smaller; color:#333;')));