Issue #15 - If admin, do not redirect -- stop at 0:00:00.

This commit is contained in:
Daniel Thee Roperto
2016-09-09 16:22:19 +10:00
parent 4c4df53402
commit cf78e2e180

View File

@@ -77,7 +77,12 @@ echo html_writer::tag('style',
var missing = this.countdown - elapsed;
if (missing <= 0) {
clearInterval(this.timer);
location.href = '<?php echo new \moodle_url('/auth/outage/info.php'); ?>';
missing = 0;
<?php
if (is_siteadmin()) {
echo 'location.href = "' . (new \moodle_url('/auth/outage/info.php')) . '";';
}
?>
}
else {
this.span.innerHTML = this.text.replace('{{countdown}}', this.seconds2hms(missing));