mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-77643 tool_mobile: Return location settings
This commit is contained in:
parent
f3bf17cdfb
commit
bba614a5eb
@ -360,6 +360,11 @@ class api {
|
|||||||
$settings->customusermenuitems = $CFG->customusermenuitems;
|
$settings->customusermenuitems = $CFG->customusermenuitems;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($section) || $section === 'locationsettings') {
|
||||||
|
$settings->timezone = $CFG->timezone;
|
||||||
|
$settings->forcetimezone = $CFG->forcetimezone;
|
||||||
|
}
|
||||||
|
|
||||||
return $settings;
|
return $settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,6 +254,8 @@ class externallib_test extends externallib_advanced_testcase {
|
|||||||
|
|
||||||
$expected[] = ['name' => 'enabledashboard', 'value' => $CFG->enabledashboard];
|
$expected[] = ['name' => 'enabledashboard', 'value' => $CFG->enabledashboard];
|
||||||
$expected[] = ['name' => 'customusermenuitems', 'value' => $CFG->customusermenuitems];
|
$expected[] = ['name' => 'customusermenuitems', 'value' => $CFG->customusermenuitems];
|
||||||
|
$expected[] = ['name' => 'timezone', 'value' => $CFG->timezone];
|
||||||
|
$expected[] = ['name' => 'forcetimezone', 'value' => $CFG->forcetimezone];
|
||||||
|
|
||||||
$this->assertCount(0, $result['warnings']);
|
$this->assertCount(0, $result['warnings']);
|
||||||
$this->assertEquals($expected, $result['settings']);
|
$this->assertEquals($expected, $result['settings']);
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
This files describes changes in tool_mobile code.
|
This files describes changes in tool_mobile code.
|
||||||
Information provided here is intended especially for developers.
|
Information provided here is intended especially for developers.
|
||||||
|
|
||||||
|
=== 4.2 ===
|
||||||
|
|
||||||
|
* External function tool_mobile::get_config now returns the timezone and forcetimezone settings.
|
||||||
|
|
||||||
=== 4.1 ===
|
=== 4.1 ===
|
||||||
|
|
||||||
* External function tool_mobile::get_config now returns the customusermenuitems setting.
|
* External function tool_mobile::get_config now returns the customusermenuitems setting.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user