Skip to content

Commit

Permalink
Merge pull request #227 from catalyst/issue225-privacy
Browse files Browse the repository at this point in the history
issue #225: fix issue with privacy tests
  • Loading branch information
dmitriim authored Nov 29, 2024
2 parents a768e5b + 6c1e3ad commit 492c1f8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions classes/steps/actions/webservice_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

namespace tool_trigger\steps\actions;

defined('MOODLE_INTERNAL') || die();

require_once($CFG->libdir . '/externallib.php');
use core_external\external_api;

/**
* Webservice action step class.
Expand Down Expand Up @@ -113,7 +111,7 @@ private function run_function() {
$params = $this->render_datafields($this->params);

// Execute the provided function name passing with the given parameters.
$response = \external_api::call_external_function($functionname, json_decode($params, true));
$response = external_api::call_external_function($functionname, json_decode($params, true));
return $response;
}

Expand Down Expand Up @@ -248,7 +246,7 @@ public function form_validation($data, $files) {
if (!empty($data['functionname'])) {
try {
$errorfield = 'functionname';
$function = \external_api::external_function_info($data['functionname']);
$function = external_api::external_function_info($data['functionname']);

$errorfield = 'params';

Expand Down Expand Up @@ -276,7 +274,7 @@ public function form_validation($data, $files) {
}

// Execute the provided function name passing with the given parameters.
// $response = \external_api::call_external_function($functionname, json_decode($params, true));
// $response = external_api::call_external_function($functionname, json_decode($params, true));
// Check if the provided function parameters are valid.
call_user_func(
[$function->classname, 'validate_parameters'],
Expand Down

0 comments on commit 492c1f8

Please sign in to comment.