Skip to content

Commit

Permalink
Merge branch 'MDL-49377-master-updatemsg' of git://github.com/mudrd8m…
Browse files Browse the repository at this point in the history
…z/moodle
  • Loading branch information
David Monllao committed Apr 16, 2015
2 parents fb3b04c + 657cb5a commit 7187ec3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions admin/renderer.php
Expand Up @@ -721,6 +721,8 @@ protected function available_updates($updates, $fetch) {
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.
Expand Down
1 change: 1 addition & 0 deletions lang/en/admin.php
Expand Up @@ -1082,6 +1082,7 @@
$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 preferences section.';
$string['updatenotificationsubject'] = 'Moodle updates are available ({$a->siteurl})';
Expand Down
5 changes: 4 additions & 1 deletion lib/classes/update/checker.php
Expand Up @@ -754,6 +754,9 @@ protected function cron_notify(array $notifications) {
$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)) {
Expand Down Expand Up @@ -785,7 +788,7 @@ protected function cron_notify(array $notifications) {
}

$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;')));
Expand Down

0 comments on commit 7187ec3

Please sign in to comment.