From 66f49e8441f97cec4707d940f1bcee556aacc2f9 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Mon, 16 Nov 2015 15:35:20 +0800 Subject: [PATCH] New script to refresh services and external functions --- mdk/scripts/external_functions.php | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 mdk/scripts/external_functions.php diff --git a/mdk/scripts/external_functions.php b/mdk/scripts/external_functions.php new file mode 100644 index 0000000..75c88e7 --- /dev/null +++ b/mdk/scripts/external_functions.php @@ -0,0 +1,41 @@ +. + +/** + * Script to refresh the services and external functions. + * + * @package mdk + * @copyright 2015 Frédéric Massart - FMCorz.net + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +define('CLI_SCRIPT', true); +require('config.php'); +require($CFG->libdir . '/upgradelib.php'); + +mtrace('Updating services of core'); +external_update_descriptions('moodle'); + +$plugintypes = core_component::get_plugin_types(); +foreach ($plugintypes as $plugintype => $dir) { + $plugins = core_component::get_plugin_list($plugintype); + foreach ($plugins as $plugin => $dir) { + $component = $plugintype . '_' . $plugin; + mtrace('Updating services of ' . $component); + external_update_descriptions($component); + } +} + -- 2.11.0