From a40a4095879fc3ea16c848c1c3f867164f43173d Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 19 Jun 2024 16:01:28 +0100 Subject: [PATCH] MDL-82244 course: use site default course visibility in external call. --- course/externallib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/course/externallib.php b/course/externallib.php index c4825433f0ee2..d4907140bb77b 100644 --- a/course/externallib.php +++ b/course/externallib.php @@ -897,7 +897,8 @@ public static function create_courses_parameters() { 'are activity report shown (yes = 1, no =0)', VALUE_DEFAULT, $courseconfig->showreports), 'visible' => new external_value(PARAM_INT, - '1: available to student, 0:not available', VALUE_OPTIONAL), + '1: available to student, 0:not available', VALUE_DEFAULT, + $courseconfig->visible), 'hiddensections' => new external_value(PARAM_INT, '(deprecated, use courseformatoptions) How the hidden sections in the course are displayed to students', VALUE_OPTIONAL),