From 5da020169e5d0f4f30d2eb3dafbe55e18345e517 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Thu, 9 Nov 2017 17:00:33 +0100 Subject: [PATCH] MDL-60760 tool_analytics: No onlycli link for managers --- admin/tool/analytics/classes/output/models_list.php | 7 ++++++- admin/tool/analytics/lang/en/tool_analytics.php | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/tool/analytics/classes/output/models_list.php b/admin/tool/analytics/classes/output/models_list.php index f33980cafeb..0e8d4e8d61d 100644 --- a/admin/tool/analytics/classes/output/models_list.php +++ b/admin/tool/analytics/classes/output/models_list.php @@ -264,8 +264,13 @@ class models_list implements \renderable, \templatable { } else { $url = new \moodle_url('/admin/settings.php', array('section' => 'analyticssettings'), 'id_s_analytics_onlycli'); + + $langstrid = 'clievaluationandpredictionsnoadmin'; + if (is_siteadmin()) { + $langstrid = 'clievaluationandpredictions'; + } $data->infos = array( - (object)array('message' => get_string('clievaluationandpredictions', 'tool_analytics', $url->out()), + (object)array('message' => get_string($langstrid, 'tool_analytics', $url->out()), 'closebutton' => true) ); } diff --git a/admin/tool/analytics/lang/en/tool_analytics.php b/admin/tool/analytics/lang/en/tool_analytics.php index 6891ec2d276..258578ce367 100644 --- a/admin/tool/analytics/lang/en/tool_analytics.php +++ b/admin/tool/analytics/lang/en/tool_analytics.php @@ -33,6 +33,7 @@ $string['clearpredictions'] = 'Clear predictions'; $string['clearmodelpredictions'] = 'Are you sure you want to clear all "{$a}" predictions?'; $string['clienablemodel'] = 'You can enable the model by selecting a time-splitting method by its ID. Note that you can also enable it later using the web interface (\'none\' to exit).'; $string['clievaluationandpredictions'] = 'A scheduled task iterates through enabled models and gets predictions. Models evaluation via the web interface is disabled. You can allow these processes to be executed manually via the web interface by disabling the \'onlycli\' analytics setting.'; +$string['clievaluationandpredictionsnoadmin'] = 'A scheduled task iterates through enabled models and gets predictions. Models evaluation via the web interface is disabled. Contact your site administrator if you are really interested in executing these processes via web interface.'; $string['editmodel'] = 'Edit "{$a}" model'; $string['edittrainedwarning'] = 'This model has already been trained. Note that changing its indicators or its time-splitting method will delete its previous predictions and start generating new predictions.'; $string['enabled'] = 'Enabled';