mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Issue #42 - Refactoring code according to Moodle Coding Style.
This commit is contained in:
19
delete.php
19
delete.php
@@ -19,20 +19,21 @@
|
||||
*
|
||||
* @package auth_outage
|
||||
* @author Daniel Thee Roperto <daniel.roperto@catalyst-au.net>
|
||||
* @copyright Catalyst IT
|
||||
* @copyright 2016 Catalyst IT
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
use auth_outage\outagedb;
|
||||
use auth_outage\outagelib;
|
||||
use auth_outage\form\outage\delete;
|
||||
use auth_outage\local\outagedb;
|
||||
use auth_outage\local\outagelib;
|
||||
|
||||
require_once('../../config.php');
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require_once($CFG->libdir . '/formslib.php');
|
||||
require_once(__DIR__.'/../../config.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
require_once($CFG->libdir.'/formslib.php');
|
||||
|
||||
$renderer = outagelib::pagesetup();
|
||||
$renderer = outagelib::page_setup();
|
||||
|
||||
$mform = new \auth_outage\forms\outage\delete();
|
||||
$mform = new delete();
|
||||
if ($mform->is_cancelled()) {
|
||||
redirect('/auth/outage/manage.php');
|
||||
} else if ($fromform = $mform->get_data()) {
|
||||
@@ -43,7 +44,7 @@ if ($mform->is_cancelled()) {
|
||||
$id = required_param('id', PARAM_INT);
|
||||
$outage = outagedb::get_by_id($id);
|
||||
if ($outage == null) {
|
||||
throw new invalid_parameter_exception('Outage #' . $id . ' not found.');
|
||||
throw new invalid_parameter_exception('Outage #'.$id.' not found.');
|
||||
}
|
||||
|
||||
$dataid = new stdClass();
|
||||
|
||||
Reference in New Issue
Block a user