summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
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();
}