MDL-66091 report_insights: Usability improvements

- More feedback provided for the user once they click on useful/notuseful from the email.
- Replace the indicator calculations table headers for the table caption and
  replace the text by just "Indicators"
- Replace "System" for the site name for insights generated at system
  level
- Replace "$modelname prediction" for "$modelname" in report/insights/prediction.php
  heading

MDL-66091
This commit is contained in:
David Monllaó 2019-08-22 15:49:41 +08:00
parent 1c3efe48f8
commit 21202090f7
6 changed files with 34 additions and 21 deletions

View file

@ -103,8 +103,12 @@ if (!$model->uses_insights()) {
exit(0);
}
if ($context->id == SYSCONTEXTID) {
$PAGE->set_heading(get_site()->shortname);
} else {
$PAGE->set_heading($insightinfo->contextname);
}
$PAGE->set_title($insightinfo->insightname);
$PAGE->set_heading($insightinfo->contextname);
// Some models generate one single prediction per context. We can directly show the prediction details in this case.
if ($model->get_analyser()::one_sample_per_analysable()) {