Issue #58 - Added extra hooks for navigation.

This commit is contained in:
Daniel Thee Roperto
2016-09-28 15:27:40 +10:00
parent e2eb105041
commit 200133dcab
3 changed files with 26 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ Installation
1. Install the plugin the same as any standard moodle plugin either via the
Moodle plugin directory, or you can use git to clone it into your source:
```git clone git@github.com:catalyst/moodle-auth_outage.git auth/basic```
`git clone git@github.com:catalyst/moodle-auth_outage.git auth/outage`
Or install via the Moodle plugin directory:

View File

@@ -24,6 +24,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*/
use auth_outage\local\outagelib;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/authlib.php');
@@ -53,6 +55,6 @@ class auth_plugin_outage extends auth_plugin_base {
* Login page hook.
*/
public function loginpage_hook() {
\auth_outage\local\outagelib::inject();
outagelib::inject();
}
}

25
lib.php
View File

@@ -22,12 +22,31 @@
* @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_extend_navigation_user() {
\auth_outage\local\outagelib::inject();
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() {
outagelib::inject();
}
function auth_outage_extend_navigation_frontpage() {
\auth_outage\local\outagelib::inject();
outagelib::inject();
}
function auth_outage_extend_navigation_user() {
outagelib::inject();
}