From 80839957ef983f9ba39a663b96b13bdccab30286 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Thu, 23 Nov 2023 16:02:02 +0800 Subject: [PATCH] MDL-76723 mod_page: Use external_format_value constructor properly * 'Content format' is passed to the $default parameter which is incorrect. * Also removed passing of VALUE_REQUIRED because it's already the default value for the $required parameter. --- mod/page/classes/external.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/page/classes/external.php b/mod/page/classes/external.php index 9f948ca601f..036a5086ee9 100644 --- a/mod/page/classes/external.php +++ b/mod/page/classes/external.php @@ -193,7 +193,7 @@ class mod_page_external extends external_api { helper_for_get_mods_by_courses::standard_coursemodule_elements_returns(), [ 'content' => new external_value(PARAM_RAW, 'Page content'), - 'contentformat' => new external_format_value('content', VALUE_REQUIRED, 'Content format'), + 'contentformat' => new external_format_value('content'), 'contentfiles' => new external_files('Files in the content'), 'legacyfiles' => new external_value(PARAM_INT, 'Legacy files flag'), 'legacyfileslast' => new external_value(PARAM_INT, 'Legacy files last control flag'),