mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Issue #9 - Checking if outage is ongoing or just a warning. Improved hooks, tests and HTML output.
This commit is contained in:
18
lib.php
18
lib.php
@@ -24,22 +24,12 @@
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
// FIXME hook not installing in courses/index.php page.
|
||||
|
||||
function auth_outage_extend_navigation_user() {
|
||||
\auth_outage\outagelib::initialize();
|
||||
}
|
||||
|
||||
function auth_outage_extend_navigation($data) {
|
||||
global $CFG;
|
||||
|
||||
// FIXME if function is not used, remove it completely.
|
||||
if ($CFG->debugdisplay) {
|
||||
var_dump($data);
|
||||
throw new \Exception("Check outage/lib.php");
|
||||
}
|
||||
|
||||
\auth_outage\outagelib::initialize();
|
||||
\auth_outage\outagelib::inject();
|
||||
}
|
||||
|
||||
function auth_outage_extend_navigation_frontpage() {
|
||||
\auth_outage\outagelib::initialize();
|
||||
\auth_outage\outagelib::inject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user