mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-60598 analytics: Info message for predictions based on data
This commit is contained in:
parent
159b4e5d8c
commit
4a145a8ae5
@ -95,6 +95,11 @@ class insights_list implements \renderable, \templatable {
|
||||
if ($this->model->uses_insights()) {
|
||||
$predictionsdata = $this->model->get_predictions($this->context, true, $this->page, $this->perpage);
|
||||
|
||||
if (!$this->model->is_static()) {
|
||||
$notification = new \core\output\notification(get_string('justpredictions', 'report_insights'));
|
||||
$data->nostaticmodelnotification = $notification->export_for_template($output);
|
||||
}
|
||||
|
||||
$data->predictions = array();
|
||||
$predictionvalues = array();
|
||||
$insights = array();
|
||||
|
@ -28,6 +28,7 @@ $string['indicator'] = 'Indicator';
|
||||
$string['insightprediction'] = '{$a} prediction';
|
||||
$string['insight'] = 'Insight';
|
||||
$string['insights'] = 'Insights';
|
||||
$string['justpredictions'] = 'Please note that the following insights are only predictions. It is not possible to predict the future with any certainty. The insights are provided so that action can be taken as necessary to prevent any negative predictions becoming reality.';
|
||||
$string['outcome'] = 'Outcome';
|
||||
$string['outcomenegative'] = 'Negative outcome';
|
||||
$string['outcomeneutral'] = 'Neutral outcome';
|
||||
|
@ -31,6 +31,9 @@
|
||||
Example context (json):
|
||||
{
|
||||
"insightname": "Best insight ever",
|
||||
"nostaticmodelnotification": {
|
||||
"message": "This is just a prediction."
|
||||
},
|
||||
"predictions": [
|
||||
{
|
||||
"predictiondisplayvalue": "This dev will understand it",
|
||||
@ -73,7 +76,14 @@
|
||||
{{/modelselector}}
|
||||
|
||||
<h2 class="m-b-2">{{{insightname}}}</h2>
|
||||
|
||||
{{^noinsights}}
|
||||
{{#nostaticmodelnotification}}
|
||||
<div class="m-t-2">
|
||||
{{> core/notification_info}}
|
||||
</div>
|
||||
{{/nostaticmodelnotification}}
|
||||
|
||||
{{{ pagingbar }}}
|
||||
{{#predictions}}
|
||||
<table class="generaltable insights-list">
|
||||
|
Loading…
x
Reference in New Issue
Block a user