MDL-57389 tool_mobile: Return mobilecssurl in get_public_config WS

This commit is contained in:
Juan Leyva 2016-12-26 18:06:15 +01:00
parent c4cf1c60f5
commit 91fff3914b
4 changed files with 10 additions and 0 deletions

View File

@ -124,6 +124,7 @@ class api {
'enablemobilewebservice' => $CFG->enablemobilewebservice,
'maintenanceenabled' => $CFG->maintenance_enabled,
'maintenancemessage' => $maintenancemessage,
'mobilecssurl' => !empty($CFG->mobilecssurl) ? $CFG->mobilecssurl : '',
);
$typeoflogin = get_config('tool_mobile', 'typeoflogin');

View File

@ -148,6 +148,7 @@ class external extends external_api {
'compactlogourl' => new external_value(PARAM_URL, 'The site compact logo URL', VALUE_OPTIONAL),
'typeoflogin' => new external_value(PARAM_INT, 'The type of login. 1 for app, 2 for browser, 3 for embedded.'),
'launchurl' => new external_value(PARAM_URL, 'SSO login launch URL. Empty if it won\'t be used.', VALUE_OPTIONAL),
'mobilecssurl' => new external_value(PARAM_URL, 'Mobile custom CSS theme', VALUE_OPTIONAL),
'warnings' => new external_warnings(),
)
);

View File

@ -83,6 +83,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
'maintenanceenabled' => $CFG->maintenance_enabled,
'maintenancemessage' => $maintenancemessage,
'typeoflogin' => api::LOGIN_VIA_APP,
'mobilecssurl' => '',
'warnings' => array()
);
$this->assertEquals($expected, $result);

View File

@ -0,0 +1,7 @@
This files describes changes in tool_mobile code.
Information provided here is intended especially for developers.
=== 3.3 ===
* External function tool_mobile::get_public_config now returns the mobilecssurl field (Mobile custom CSS theme).