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),