From d12594682031248406a60a87362769150179f29c Mon Sep 17 00:00:00 2001 From: Jonathon Fowler Date: Wed, 18 Sep 2024 14:47:40 +1000 Subject: [PATCH] fix test errors in core_external\external_api_test test_all_external_info complains about `Invalid $required parameter value: ''` and VALUE_DEFAULT seems the appropriate substitute. refs #99 --- externallib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/externallib.php b/externallib.php index 2cd1c7e..08aeda3 100644 --- a/externallib.php +++ b/externallib.php @@ -134,7 +134,7 @@ public static function find_usage_for_item_returns() { 'visible' => new external_value(PARAM_BOOL, 'Whether the content is visible. False if either the content itself or the course is not visible.'), 'attributes' => new external_multiple_structure(new external_single_structure(array( - 'key' => new external_value(PARAM_RAW, 'Attribute key'),'value' => new external_value(PARAM_RAW, 'Attribute value'))), '', false)))))); + 'key' => new external_value(PARAM_RAW, 'Attribute key'),'value' => new external_value(PARAM_RAW, 'Attribute value'))), '', VALUE_DEFAULT)))))); } public static function find_all_usage_returns() { return new external_single_structure(array( @@ -162,7 +162,7 @@ public static function find_all_usage_returns() { 'visible' => new external_value(PARAM_BOOL, 'Whether the content is visible. False if either the content itself or the course is not visible.'), 'attributes' => new external_multiple_structure(new external_single_structure(array( - 'key' => new external_value(PARAM_RAW, 'Attribute key'),'value' => new external_value(PARAM_RAW, 'Attribute value'))), '', false)))))); + 'key' => new external_value(PARAM_RAW, 'Attribute key'),'value' => new external_value(PARAM_RAW, 'Attribute value'))), '', VALUE_DEFAULT)))))); } public static function unfiltered_usage_count_returns() { return new external_single_structure(array(