From: Petr Skoda <skodak@moodle.org> Date: Tue, 27 Oct 2009 09:32:36 +0000 (+0000) Subject: MDL-12886 support for custom test client forms in plugins X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4a2ff5e40bef1dcf3d8b7d0c4406e7765fcf37c5;p=moodle.git MDL-12886 support for custom test client forms in plugins --- diff --git a/webservice/testclient.php b/webservice/testclient.php index f4f0cb3e6d..ee5269b651 100644 --- a/webservice/testclient.php +++ b/webservice/testclient.php @@ -40,6 +40,11 @@ require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); $allfunctions = $DB->get_records('external_functions', array(), 'name ASC'); $functions = array(); foreach ($allfunctions as $f) { + $finfo = external_function_info($f); + if (!empty($finfo->testclientpath) and file_exists($CFG->dirroot.'/'.$finfo->testclientpath)) { + //some plugins may want to have own test client forms + include_once($CFG->dirroot.'/'.$finfo->testclientpath); + } $class = $f->name.'_form'; if (class_exists($class)) { $functions[$f->name] = $f->name;