mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Issue #42 - Refactoring code according to Moodle Coding Style.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
*
|
||||
* @package auth_outage
|
||||
* @author Daniel Thee Roperto <daniel.roperto@catalyst-au.net>
|
||||
* @copyright Catalyst IT
|
||||
* @copyright 2016 Catalyst IT
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
@@ -28,11 +28,11 @@ defined('MOODLE_INTERNAL') || die();
|
||||
if ($this->has_admin_options()) {
|
||||
$adminlinks = [];
|
||||
foreach ([
|
||||
'startofwarning' => -$this->outage->get_warning_duration(),
|
||||
'15secondsbefore' => -15,
|
||||
'start' => 0,
|
||||
'endofoutage' => $this->outage->get_duration_planned(),
|
||||
] as $title => $delta) {
|
||||
'startofwarning' => -$this->outage->get_warning_duration(),
|
||||
'15secondsbefore' => -15,
|
||||
'start' => 0,
|
||||
'endofoutage' => $this->outage->get_duration_planned(),
|
||||
] as $title => $delta) {
|
||||
$adminlinks[] = html_writer::link(
|
||||
new moodle_url(
|
||||
'/auth/outage/info.php',
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*
|
||||
* @package auth_outage
|
||||
* @author Daniel Thee Roperto <daniel.roperto@catalyst-au.net>
|
||||
* @copyright Catalyst IT
|
||||
* @copyright 2016 Catalyst IT
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
@@ -56,7 +56,7 @@ require($CFG->dirroot.'/auth/outage/views/warningbar.php');
|
||||
|
||||
<section>
|
||||
<h2><?php echo $this->outage->get_title(); ?></h2>
|
||||
<?php require('content.php'); ?>
|
||||
<?php require(__DIR__.'/content.php'); ?>
|
||||
</section>
|
||||
|
||||
<!-- <?php echo
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
*
|
||||
* @package auth_outage
|
||||
* @author Daniel Thee Roperto <daniel.roperto@catalyst-au.net>
|
||||
* @copyright Catalyst IT
|
||||
* @copyright 2016 Catalyst IT
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
use auth_outage\outagelib;
|
||||
use auth_outage\local\outagelib;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
@@ -64,11 +64,11 @@ echo html_writer::tag('style', outagelib::get_config()->css);
|
||||
$text = html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/check'),
|
||||
'alt' => get_string('finish', 'auth_outage'),
|
||||
'class' => 'iconsmall'
|
||||
]) . ' ' . get_string('finish', 'auth_outage');
|
||||
'class' => 'iconsmall',
|
||||
]).' '.get_string('finish', 'auth_outage');
|
||||
$attr = [
|
||||
'title' => get_string('finish', 'auth_outage'),
|
||||
'class' => 'auth_outage_warningbar_box_finish'
|
||||
'class' => 'auth_outage_warningbar_box_finish',
|
||||
];
|
||||
echo html_writer::link($url, $text, $attr);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ echo html_writer::tag('style', outagelib::get_config()->css);
|
||||
|
||||
<?php if (!$static && !$outage->is_ongoing($time)): ?>
|
||||
<script>
|
||||
<?php require($CFG->dirroot . '/auth/outage/views/warningbar.js'); ?>
|
||||
<?php require($CFG->dirroot.'/auth/outage/views/warningbar.js'); ?>
|
||||
auth_outage_countdown.init(
|
||||
<?php echo($outage->starttime - $time); ?>,
|
||||
<?php echo(is_siteadmin() ? 'true' : 'false'); ?>,
|
||||
|
||||
Reference in New Issue
Block a user