Skip to content
Snippets Groups Projects
Commit 6355c382 authored by Thomas Dondorf's avatar Thomas Dondorf
Browse files

Notice regarding reset of browser/OS report is also shown in test environment...

Notice regarding reset of browser/OS report is also shown in test environment and when there is no data to show
parent 88758123
No related branches found
No related tags found
No related merge requests found
......@@ -195,12 +195,13 @@ class lareport_browser_os extends report_base {
];
}
// TODO This notice needs to be removed in the future
private static function notice() {
global $SITE;
$langstring = get_string('special_notice', 'lareport_browser_os');
$showuntil = strtotime('2020-05-26');
if ($SITE->shortname === 'RWTHmoodle' && time() < $showuntil) {
if (($SITE->shortname === 'RWTHmoodle' || $SITE->shortname === 'L2PTest') && time() < $showuntil) {
return ["<div class='alert alert-info' role='alert'>{$langstring}</div>"];
}
return [];
......@@ -235,7 +236,10 @@ class lareport_browser_os extends report_base {
arsort($results['browser']);
if ($maxvalue === 0) {
return [get_string('no_data_to_show', 'lareport_browser_os')];
return array_merge(
self::notice(),
[get_string('no_data_to_show', 'lareport_browser_os')]
);
}
return array_merge(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment