mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-57409 tool_mobile: Return mobileapp settings in get_config WS
This commit is contained in:
parent
fb0add0456
commit
7bdcf970bc
@ -202,6 +202,10 @@ class api {
|
||||
$settings->mygradesurl = user_mygrades_url()->out(false);
|
||||
}
|
||||
|
||||
if (empty($section) or $section == 'mobileapp') {
|
||||
$settings->tool_mobile_forcelogout = get_config('tool_mobile', 'forcelogout');
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
|
@ -144,6 +144,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
|
||||
array('name' => 'commentsperpage', 'value' => $CFG->commentsperpage),
|
||||
array('name' => 'disableuserimages', 'value' => $CFG->disableuserimages),
|
||||
array('name' => 'mygradesurl', 'value' => user_mygrades_url()->out(false)),
|
||||
array('name' => 'tool_mobile_forcelogout', 'value' => 0),
|
||||
);
|
||||
$this->assertCount(0, $result['warnings']);
|
||||
$this->assertEquals($expected, $result['settings']);
|
||||
@ -151,8 +152,8 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
|
||||
// Change a value and retrieve filtering by section.
|
||||
set_config('commentsperpage', 1);
|
||||
$expected[10]['value'] = 1;
|
||||
unset($expected[11]);
|
||||
unset($expected[12]);
|
||||
// Remove not expected elements.
|
||||
array_splice($expected, 11);
|
||||
|
||||
$result = external::get_config('frontpagesettings');
|
||||
$result = external_api::clean_returnvalue(external::get_config_returns(), $result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user