From 03e50cb759e7bb8fbdf77d190616f30248837e54 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/course/externallib.php b/course/externallib.php index f6f803d2fcb..589b02529e0 100644 --- a/course/externallib.php +++ b/course/externallib.php @@ -896,8 +896,12 @@ class core_course_external extends external_api { 'showreports' => new external_value(PARAM_INT, '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), + 'visible' => new external_value( + PARAM_INT, + '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),