diff --git a/classes/external/external_api.php b/classes/external/external_api.php new file mode 100644 index 00000000..cb6717ec --- /dev/null +++ b/classes/external/external_api.php @@ -0,0 +1,33 @@ +. + +namespace tool_dataflows\external; + +// Moved as part of https://tracker.moodle.org/browse/MDL-78049 so this is +// required to redirect sites using older versions of Moodle to the previous +// implementation. +// Once the base supported version is 4.2, this is no longer required. +if (class_exists(\external_api::class)) { + class_alias(\external_api::class, current_external_api::class); +} else { + class_alias(\core_external\external_api::class, current_external_api::class); +} + +/** + * Backwards compatibility class for underlying core's external_api + */ +class external_api extends current_external_api { +} diff --git a/classes/external/trigger_dataflow.php b/classes/external/trigger_dataflow.php index 58a0575d..bd0562be 100644 --- a/classes/external/trigger_dataflow.php +++ b/classes/external/trigger_dataflow.php @@ -31,7 +31,7 @@ * @copyright Catalyst IT, 2023 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class trigger_dataflow extends \external_api { +class trigger_dataflow extends external_api { /** * Returns description of method parameters diff --git a/classes/local/step/flow_web_service.php b/classes/local/step/flow_web_service.php index 63144d35..55312f31 100644 --- a/classes/local/step/flow_web_service.php +++ b/classes/local/step/flow_web_service.php @@ -16,11 +16,9 @@ namespace tool_dataflows\local\step; -defined('MOODLE_INTERNAL') || die(); - use core_user; use core\session\manager; -use core_external\external_api; +use tool_dataflows\external\external_api; use moodle_exception; use Symfony\Component\Yaml\Yaml; use Throwable; diff --git a/version.php b/version.php index fe6597ee..32e6545f 100644 --- a/version.php +++ b/version.php @@ -25,8 +25,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2023063000; -$plugin->release = 2023063000; +$plugin->version = 2023063002; +$plugin->release = 2023063002; $plugin->requires = 2017051500; // Our lowest supported Moodle (3.3.0). $plugin->supported = [35, 401]; // Available as of Moodle 3.9.0 or later. // TODO $plugin->incompatible = ; // Available as of Moodle 3.9.0 or later.