MDL-73233 tool_mobile: Return enabledashboard setting

External function tool_mobile::get_config now returns the
enabledashboard setting.
This commit is contained in:
Sara Arjona 2022-02-25 17:10:28 +01:00
parent 42c96d1708
commit 07f7da93cc
3 changed files with 7 additions and 1 deletions

View File

@ -340,6 +340,10 @@ class api {
$settings->coursegraceperiodbefore = $CFG->coursegraceperiodbefore;
}
if (empty($section) || $section === 'navigation') {
$settings->enabledashboard = $CFG->enabledashboard;
}
return $settings;
}

View File

@ -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']);

View File

@ -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).