From efee27af4045693a28743474b7bf5442b516d9c4 Mon Sep 17 00:00:00 2001 From: Daniel Thee Roperto Date: Thu, 8 Sep 2016 11:13:46 +1000 Subject: [PATCH] Solving all warnings from moodle-plugin-ci check. --- classes/outagelib.php | 3 --- db/upgrade.php | 34 ++++++++++++++++++++++++++++++++++ res/outage.css | 20 ++++++++++---------- 3 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 db/upgrade.php diff --git a/classes/outagelib.php b/classes/outagelib.php index b35cfb7..d893572 100644 --- a/classes/outagelib.php +++ b/classes/outagelib.php @@ -57,7 +57,6 @@ class outagelib { */ public static function inject() { global $CFG; - global $PAGE; // Many hooks can call it, execute only once. if (self::$initialized) { @@ -69,8 +68,6 @@ class outagelib { return; } - // FIXME Code below is raising error at http://moodle.test/my/ for example. - // $PAGE->add_body_class('auth_outage_active'); $CFG->additionalhtmltopofbody = self::get_renderer()->renderbar($active) . $CFG->additionalhtmltopofbody; } diff --git a/db/upgrade.php b/db/upgrade.php new file mode 100644 index 0000000..7ed51be --- /dev/null +++ b/db/upgrade.php @@ -0,0 +1,34 @@ +. + +/** + * Outage plugin upgrade code + * + * @package auth_outage + * @author Daniel Thee Roperto + * @copyright Catalyst IT + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +defined('MOODLE_INTERNAL') || die(); + +/** + * @param int $oldversion the version we are upgrading from + * @return bool result + * @SuppressWarnings("unused") + */ +function xmldb_auth_outage_upgrade($oldversion) { + return true; +} diff --git a/res/outage.css b/res/outage.css index 2572bf7..1269b0a 100644 --- a/res/outage.css +++ b/res/outage.css @@ -1,19 +1,19 @@ .auth_outage_warningbar { - box-sizing: content-box; - position: fixed; - top: 0px; - left: 0px; - height: 90px; - z-index: 9999; - width: 100%; - text-align: center; background-color: white; + box-sizing: content-box; + height: 90px; + left: 0; + position: fixed; + text-align: center; + top: 0; + width: 100%; + z-index: 9999; } .auth_outage_warningbar_box { - border-top: 2px dashed #a00000; - border-bottom: 2px dashed #a00000; background-color: #ffcccc; + border-bottom: 2px dashed #a00000; + border-top: 2px dashed #a00000; color: #a00000; }