diff --git a/admin/tool/mobile/classes/api.php b/admin/tool/mobile/classes/api.php index e57242572d5..72e1151ab9c 100644 --- a/admin/tool/mobile/classes/api.php +++ b/admin/tool/mobile/classes/api.php @@ -340,6 +340,10 @@ class api { $settings->coursegraceperiodbefore = $CFG->coursegraceperiodbefore; } + if (empty($section) || $section === 'navigation') { + $settings->enabledashboard = $CFG->enabledashboard; + } + return $settings; } diff --git a/admin/tool/mobile/tests/externallib_test.php b/admin/tool/mobile/tests/externallib_test.php index 1e96562a5a9..a3af5eec152 100644 --- a/admin/tool/mobile/tests/externallib_test.php +++ b/admin/tool/mobile/tests/externallib_test.php @@ -233,6 +233,8 @@ class externallib_test extends externallib_advanced_testcase { $expected[] = ['name' => 'coursegraceperiodafter', 'value' => $CFG->coursegraceperiodafter]; $expected[] = ['name' => 'coursegraceperiodbefore', 'value' => $CFG->coursegraceperiodbefore]; + $expected[] = ['name' => 'enabledashboard', 'value' => $CFG->enabledashboard]; + $this->assertCount(0, $result['warnings']); $this->assertEquals($expected, $result['settings']); diff --git a/admin/tool/mobile/upgrade.txt b/admin/tool/mobile/upgrade.txt index 6d71d33530a..3328072493d 100644 --- a/admin/tool/mobile/upgrade.txt +++ b/admin/tool/mobile/upgrade.txt @@ -5,6 +5,7 @@ Information provided here is intended especially for developers. * The function tool_mobile\api::get_qrlogin_key() now requires as parameter an object with all the mobile plugin settings. * The tool_mobile_external::get_config external function now returns the tool_mobile_autologinmintimebetweenreq setting. +* External function tool_mobile::get_config now returns the enabledashboard setting. === 3.7 === @@ -28,4 +29,3 @@ Information provided here is intended especially for developers. * External function tool_mobile::get_public_config now returns the mobilecssurl field (Mobile custom CSS theme). * External function tool_mobile::get_public_config now returns the identityproviders field (list of external identity providers). -