Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07970f36e3 | ||
|
|
1e81988bf5 | ||
|
|
217c79d867 | ||
|
|
4c63223050 |
@@ -89,6 +89,11 @@ class service_edit_form extends moodleform {
|
|||||||
$mform->addElement("text", "token", new lang_string("token", "webservice"), $size);
|
$mform->addElement("text", "token", new lang_string("token", "webservice"), $size);
|
||||||
$mform->setType("token", PARAM_NOTAGS);
|
$mform->setType("token", PARAM_NOTAGS);
|
||||||
|
|
||||||
|
/* Additional information */
|
||||||
|
$mform->addElement("text", "other", new lang_string("courserequestsupport", "moodle"), $size);
|
||||||
|
$mform->setType("other", PARAM_NOTAGS);
|
||||||
|
$mform->setAdvanced("other");
|
||||||
|
|
||||||
/* Content type */
|
/* Content type */
|
||||||
$contenttype = array("json" => "application/json", "x-www-form-urlencoded" => "application/x-www-form-urlencoded");
|
$contenttype = array("json" => "application/json", "x-www-form-urlencoded" => "application/x-www-form-urlencoded");
|
||||||
$mform->addElement("select", "type", "Content type", $contenttype);
|
$mform->addElement("select", "type", "Content type", $contenttype);
|
||||||
|
|||||||
@@ -86,6 +86,10 @@ class handler {
|
|||||||
$data["token"] = $callback->token;
|
$data["token"] = $callback->token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($callback->other)) {
|
||||||
|
$data["extra"] = $callback->other;
|
||||||
|
}
|
||||||
|
|
||||||
self::send($data, $callback);
|
self::send($data, $callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<XMLDB PATH="blocks/local_webhooks/db" VERSION="20171027" COMMENT="XMLDB file for Moodle" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd">
|
<XMLDB PATH="blocks/local_webhooks/db" VERSION="20171029" COMMENT="XMLDB file for Moodle" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd">
|
||||||
<TABLES>
|
<TABLES>
|
||||||
<TABLE NAME="local_webhooks_service" COMMENT="A table for storing callback services.">
|
<TABLE NAME="local_webhooks_service" COMMENT="A table for storing callback services.">
|
||||||
<FIELDS>
|
<FIELDS>
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
<FIELD NAME="type" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" />
|
<FIELD NAME="type" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" />
|
||||||
<FIELD NAME="token" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" />
|
<FIELD NAME="token" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" />
|
||||||
<FIELD NAME="events" TYPE="text" NOTNULL="false" SEQUENCE="false" />
|
<FIELD NAME="events" TYPE="text" NOTNULL="false" SEQUENCE="false" />
|
||||||
|
<FIELD NAME="other" TYPE="text" NOTNULL="false" SEQUENCE="false" />
|
||||||
</FIELDS>
|
</FIELDS>
|
||||||
<KEYS>
|
<KEYS>
|
||||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" />
|
<KEY NAME="primary" TYPE="primary" FIELDS="id" />
|
||||||
|
|||||||
+2
-2
@@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
defined("MOODLE_INTERNAL") || die();
|
defined("MOODLE_INTERNAL") || die();
|
||||||
|
|
||||||
$plugin->release = "1.0.0 (Build: 2017102700)";
|
$plugin->release = "1.1.0 (Build: 2017102900)";
|
||||||
$plugin->version = 2017102700;
|
$plugin->version = 2017102900;
|
||||||
$plugin->requires = 2016112900;
|
$plugin->requires = 2016112900;
|
||||||
$plugin->component = "local_webhooks";
|
$plugin->component = "local_webhooks";
|
||||||
$plugin->maturity = MATURITY_STABLE;
|
$plugin->maturity = MATURITY_STABLE;
|
||||||
Reference in New Issue
Block a user