Skip to content

Commit

Permalink
MDL-60760 tool_analytics: No onlycli link for managers
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Nov 9, 2017
1 parent ccf7578 commit 5da0201
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion admin/tool/analytics/classes/output/models_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,13 @@ public function export_for_template(\renderer_base $output) {
} 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)
);
}
Expand Down
1 change: 1 addition & 0 deletions admin/tool/analytics/lang/en/tool_analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
$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 <a href="{$a}">\'onlycli\'</a> 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';
Expand Down

0 comments on commit 5da0201

Please sign in to comment.