From 329d3a8de5d5dcbce0a5e90e00fc0241b2d3238c Mon Sep 17 00:00:00 2001 From: Mathew May Date: Mon, 8 Jun 2020 15:32:48 +0800 Subject: [PATCH] MDL-68946 tool_task: Make clionly string handling more consistent --- admin/tool/task/classes/check/cronrunning.php | 14 +++++++++++--- lang/en/admin.php | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/admin/tool/task/classes/check/cronrunning.php b/admin/tool/task/classes/check/cronrunning.php index 46aa6908231..2efcee17950 100644 --- a/admin/tool/task/classes/check/cronrunning.php +++ b/admin/tool/task/classes/check/cronrunning.php @@ -81,9 +81,17 @@ class cronrunning extends check { } if (empty($lastcron)) { - $summary = get_string('cronwarningnever', 'admin', [ - 'expected' => $formatexpected, - ]); + if (empty($CFG->cronclionly)) { + $url = new \moodle_url('/admin/cron.php'); + $summary = get_string('cronwarningneverweb', 'admin', [ + 'url' => $url->out(), + 'expected' => $formatexpected, + ]); + } else { + $summary = get_string('cronwarningnever', 'admin', [ + 'expected' => $formatexpected, + ]); + } } else if (empty($CFG->cronclionly)) { $url = new \moodle_url('/admin/cron.php'); $summary = get_string('cronwarning', 'admin', [ diff --git a/lang/en/admin.php b/lang/en/admin.php index a04da00fbdf..872d80fbac8 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -433,6 +433,7 @@ $string['cronremotepassword'] = 'Cron password for remote access'; $string['cronwarning'] = 'The admin/cron.php script has not been run for {$a->actual} and should run every {$a->expected}.'; $string['cronwarningcli'] = 'The admin/cli/cron.php script has not been run for {$a->actual} and should run every {$a->expected}.'; $string['cronwarningnever'] = 'The admin/cli/cron.php script has never been run and should run every {$a->expected}.'; +$string['cronwarningneverweb'] = 'The admin/cron.php script script has never been run and should run every {$a->expected}.'; $string['ctyperequired'] = 'The ctype PHP extension is now required by Moodle, in order to improve site performance and to offer multilingual compatibility.'; $string['curlsecurityallowedport'] = 'cURL allowed ports list'; $string['curlsecurityallowedportsyntax'] = 'List of port numbers that cURL can connect to. Valid entries are integer numbers only. Put each entry on a new line. If left empty, then all ports are allowed. If set, in almost all cases, both 443 and 80 should be specified for cURL to connect to standard HTTPS and HTTP ports.';