Issue #10 - Added link to warning bar and info page.

This commit is contained in:
Daniel Thee Roperto
2016-09-08 14:31:51 +10:00
parent efee27af40
commit a4de5d6bf1
7 changed files with 138 additions and 10 deletions

43
classes/forms/gohome.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace auth_outage\forms;
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); // It must be included from a Moodle page.
}
require_once($CFG->libdir . '/formslib.php');
/**
* Home form. Shows a button 'Continue' and moves to home page once clicked.
*
* @package auth_outage
* @author Daniel Thee Roperto <daniel.roperto@catalyst-au.net>
* @copyright Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class gohome extends \moodleform {
const TITLE_MAX_CHARS = 100;
/**
* {@inheritDoc}
* @see moodleform::definition()
*/
public function definition() {
$this->add_action_buttons(false, get_string('continue'));
}
}

View File

@@ -39,7 +39,7 @@ class outagelib {
public static function pagesetup() {
global $PAGE;
admin_externalpage_setup('auth_outage_manage');
$PAGE->set_url(new \moodle_url('/auth/outage/list.php'));
$PAGE->set_url(new \moodle_url('/auth/outage/manage.php'));
return self::get_renderer();
}
@@ -68,7 +68,7 @@ class outagelib {
return;
}
$CFG->additionalhtmltopofbody = self::get_renderer()->renderbar($active)
$CFG->additionalhtmltopofbody = self::get_renderer()->renderoutagebar($active)
. $CFG->additionalhtmltopofbody;
}