mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Issue #11 - Manage lists outages in separate tables.
This commit is contained in:
7
info.php
7
info.php
@@ -28,14 +28,15 @@ use auth_outage\outagelib;
|
||||
|
||||
require_once('../../config.php');
|
||||
|
||||
$outage = outagedb::get_active();
|
||||
$id = optional_param('id', null, PARAM_INT);
|
||||
$outage = is_null($id) ? outagedb::get_active() : outagedb::get_by_id($id);
|
||||
if (is_null($outage)) {
|
||||
redirect(new moodle_url('/'));
|
||||
}
|
||||
|
||||
$PAGE->set_context(context_system::instance());
|
||||
$PAGE->set_title("Outage Warning");
|
||||
$PAGE->set_heading("Outage Warning");
|
||||
$PAGE->set_title($outage->get_title());
|
||||
$PAGE->set_heading($outage->get_title());
|
||||
$PAGE->set_url(new \moodle_url('/auth/outage/info.php'));
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
||||
Reference in New Issue
Block a user