From 6d2c321d7cf76d63fbafde3aca8a02deb47b079e Mon Sep 17 00:00:00 2001 From: Amaia Anabitarte Date: Mon, 13 Mar 2023 11:47:05 +0100 Subject: [PATCH] MDL-76991 tool_mobile: Return course format indentation setting --- course/format/topics/lib.php | 4 +++- course/format/weeks/lib.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/course/format/topics/lib.php b/course/format/topics/lib.php index 3e099ee003c..b745164ca0d 100644 --- a/course/format/topics/lib.php +++ b/course/format/topics/lib.php @@ -453,7 +453,9 @@ class format_topics extends core_courseformat\base { */ public function get_config_for_external() { // Return everything (nothing to hide). - return $this->get_format_options(); + $formatoptions = $this->get_format_options(); + $formatoptions['indentation'] = get_config('format_topics', 'indentation'); + return $formatoptions; } } diff --git a/course/format/weeks/lib.php b/course/format/weeks/lib.php index a655ff3a474..3bd726b4fc3 100644 --- a/course/format/weeks/lib.php +++ b/course/format/weeks/lib.php @@ -615,7 +615,9 @@ class format_weeks extends core_courseformat\base { */ public function get_config_for_external() { // Return everything (nothing to hide). - return $this->get_format_options(); + $formatoptions = $this->get_format_options(); + $formatoptions['indentation'] = get_config('format_weeks', 'indentation'); + return $formatoptions; } }