From 4a2ff5e40bef1dcf3d8b7d0c4406e7765fcf37c5 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 27 Oct 2009 09:32:36 +0000 Subject: [PATCH] MDL-12886 support for custom test client forms in plugins --- webservice/testclient.php | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.5