summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/events.php4
-rw-r--r--classes/forms.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/classes/events.php b/classes/events.php
index 7fbe343..613ac9d 100644
--- a/classes/events.php
+++ b/classes/events.php
@@ -74,7 +74,9 @@ class events {
*/
private static function handler_callback($data, $callback) {
if ($callback->enable) {
- $events = unserialize(gzuncompress(base64_decode($callback->events)));
+ if (!empty($callback->events)) {
+ $events = unserialize(gzuncompress(base64_decode($callback->events)));
+ }
if (boolval($events[$data["eventname"]])) {
/* Adding to the data token */
diff --git a/classes/forms.php b/classes/forms.php
index e0267ce..6fb9972 100644
--- a/classes/forms.php
+++ b/classes/forms.php
@@ -81,7 +81,7 @@ class service_edit_form extends moodleform {
$mform->addRule("url", null, "required");
/* Enabling the service */
- $mform->addElement("checkbox", "enable",
+ $mform->addElement("advcheckbox", "enable",
new lang_string("enable", "moodle"));
$mform->setType("enable", PARAM_BOOL);
$mform->setDefault("enable", 1);