aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-11-18 05:31:25 +0300
committerValentin Popov <info@valentineus.link>2017-11-18 05:31:25 +0300
commit97140dccf76f878991853d827449ca608eb91864 (patch)
tree7017e6d948a6aaa0bd36a10921987cc614132322 /classes
parentbf2cef3ea035f4487e4b41e3033c60b1f1f0ead3 (diff)
downloadlocal_webhooks-97140dccf76f878991853d827449ca608eb91864.tar.xz
local_webhooks-97140dccf76f878991853d827449ca608eb91864.zip
Aesthetics in the code
Diffstat (limited to 'classes')
-rw-r--r--classes/editform.php6
-rw-r--r--classes/event/response_get.php4
-rw-r--r--classes/handler.php9
3 files changed, 10 insertions, 9 deletions
diff --git a/classes/editform.php b/classes/editform.php
index 46a8f23..64e1e20 100644
--- a/classes/editform.php
+++ b/classes/editform.php
@@ -28,9 +28,9 @@ defined("MOODLE_INTERNAL") || die();
require_once($CFG->libdir . "/formslib.php");
-use report_eventlist_list_generator;
use lang_string;
use moodleform;
+use report_eventlist_list_generator;
/**
* Description editing form definition.
@@ -64,7 +64,7 @@ class service_edit_form extends moodleform {
*/
protected function definition() {
$mform =& $this->_form;
- $size = array("size" => 60);
+ $size = array("size" => 60);
/* Form heading */
$mform->addElement("header", "editserviceheader", new lang_string("service", "webservice"));
@@ -104,7 +104,7 @@ class service_edit_form extends moodleform {
/* List of events */
$eventlist = report_eventlist_list_generator::get_all_events_list(true);
- $events = array();
+ $events = array();
/* Formation of the list of elements */
foreach ($eventlist as $event) {
diff --git a/classes/event/response_get.php b/classes/event/response_get.php
index d1bbf8b..5e25474 100644
--- a/classes/event/response_get.php
+++ b/classes/event/response_get.php
@@ -37,9 +37,9 @@ class response_get extends \core\event\base {
* Init method.
*/
protected function init() {
- $this->data["crud"] = "u";
+ $this->data["crud"] = "r";
+ $this->data["edulevel"] = self::LEVEL_OTHER;
$this->data["objecttable"] = "local_webhooks_service";
- $this->data["edulevel"] = self::LEVEL_OTHER;
}
/**
diff --git a/classes/handler.php b/classes/handler.php
index a9fddf7..ac933a9 100644
--- a/classes/handler.php
+++ b/classes/handler.php
@@ -120,12 +120,13 @@ class handler {
$event = \local_webhooks\event\response_get::create(
array(
- "context" => \context_system::instance(0),
+ "context" => \context_system::instance(0),
"objectid" => $callback->id,
- "other" => array(
- "status" => $status
+ "other" => array(
+ "status" => $status
+ )
)
- ));
+ );
$event->trigger();
}