mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Issue #15 - If admin, do not redirect -- stop at 0:00:00.
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user