Issue #42 - Refactoring code according to Moodle Coding Style.

This commit is contained in:
Daniel Thee Roperto
2016-09-21 18:38:12 +10:00
parent 19b66629a8
commit 708622bbcd
47 changed files with 687 additions and 645 deletions

View File

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