From 2e363d1acf7a012f1032f6bf31f8aa4d4b589aec Mon Sep 17 00:00:00 2001 From: Daniel Thee Roperto Date: Thu, 29 Sep 2016 09:53:19 +1000 Subject: [PATCH] Issue #58 - Decided to support only Moodle 29+ however older versions may work if using an additional local plugin (skeleton included in the local_outage subfolder). --- lib.php | 15 ++--------- local_outage/README.md | 6 +++++ local_outage/lang/en/local_outage.php | 26 +++++++++++++++++++ local_outage/lib.php | 36 +++++++++++++++++++++++++++ local_outage/version.php | 32 ++++++++++++++++++++++++ views/warningbar/warningbar.css | 2 +- 6 files changed, 103 insertions(+), 14 deletions(-) create mode 100644 local_outage/README.md create mode 100644 local_outage/lang/en/local_outage.php create mode 100644 local_outage/lib.php create mode 100644 local_outage/version.php diff --git a/lib.php b/lib.php index 30ed7b1..d0932dc 100644 --- a/lib.php +++ b/lib.php @@ -22,23 +22,12 @@ * @copyright 2016 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + use auth_outage\local\outagelib; defined('MOODLE_INTERNAL') || die; -function auth_outage_extends_navigation() { - outagelib::inject(); -} - -function auth_outage_extends_settings_navigation() { - outagelib::inject(); -} - -function auth_outage_extend_navigation() { - outagelib::inject(); -} - -function auth_outage_extend_settings_navigation() { +function auth_outage_extend_navigation_user_settings() { outagelib::inject(); } diff --git a/local_outage/README.md b/local_outage/README.md new file mode 100644 index 0000000..866b575 --- /dev/null +++ b/local_outage/README.md @@ -0,0 +1,6 @@ +What is this? +------------- + +This is a local plugin used together with the auth plugin. + +You will only need it if you are using Moodle 2.8 or lower. diff --git a/local_outage/lang/en/local_outage.php b/local_outage/lang/en/local_outage.php new file mode 100644 index 0000000..28a0b0a --- /dev/null +++ b/local_outage/lang/en/local_outage.php @@ -0,0 +1,26 @@ +. +// +/** + * Strings for component 'local_outage', language 'en'. + * + * @package local_outage + * @author Daniel Thee Roperto + * @copyright 2016 Catalyst IT + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Outage for Old Moodle'; diff --git a/local_outage/lib.php b/local_outage/lib.php new file mode 100644 index 0000000..9a85e58 --- /dev/null +++ b/local_outage/lib.php @@ -0,0 +1,36 @@ +. + +/** + * local_outage plugin lib + * + * @package local_outage + * @author Daniel Thee Roperto + * @copyright 2016 Catalyst IT + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +use auth_outage\local\outagelib; + +defined('MOODLE_INTERNAL') || die(); + +function local_outage_extend_navigation() { + outagelib::inject(); +} + +function local_outage_extend_settings_navigation() { + outagelib::inject(); +} diff --git a/local_outage/version.php b/local_outage/version.php new file mode 100644 index 0000000..196a3ae --- /dev/null +++ b/local_outage/version.php @@ -0,0 +1,32 @@ +. + +/** + * Version information. + * + * @package local_outage + * @author Daniel Thee Roperto + * @copyright 2016 Catalyst IT + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->component = "local_outage"; +$plugin->version = 2016092900; // The current plugin version (Date: YYYYMMDDXX). +$plugin->release = 'Build '.$plugin->version; // Human-readable release information. +$plugin->requires = 2014051200; // Requires Moodle 2.7 or later. +$plugin->maturity = MATURITY_STABLE; // Not suitable for PRODUCTION environments yet! diff --git a/views/warningbar/warningbar.css b/views/warningbar/warningbar.css index 6b4d497..260ab96 100644 --- a/views/warningbar/warningbar.css +++ b/views/warningbar/warningbar.css @@ -63,7 +63,7 @@ If you need to make changes here, remember to update your settings inside Moodle } .auth_outage_warningbar_center { - margin-top: -45px; + margin-top: -35px; position: relative; top: 50%; }