Issue #9 - Checking if outage is ongoing or just a warning. Improved hooks, tests and HTML output.

This commit is contained in:
Daniel Thee Roperto
2016-09-06 17:17:26 +10:00
parent be477ee787
commit 583516a3c7
9 changed files with 76 additions and 22 deletions

18
lib.php
View File

@@ -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();
}