mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-66775 tool_mobile: Return additional app data
We need this information for creating a link to the app store listing for updating.
This commit is contained in:
parent
4bf08f5b4d
commit
12a289c7a4
@ -178,6 +178,9 @@ class api {
|
||||
'langlist' => $CFG->langlist,
|
||||
'locale' => $CFG->locale,
|
||||
'tool_mobile_minimumversion' => get_config('tool_mobile', 'minimumversion'),
|
||||
'tool_mobile_iosappid' => get_config('tool_mobile', 'iosappid'),
|
||||
'tool_mobile_androidappid' => get_config('tool_mobile', 'androidappid'),
|
||||
'tool_mobile_setuplink' => clean_param(get_config('tool_mobile', 'setuplink'), PARAM_URL),
|
||||
);
|
||||
|
||||
$typeoflogin = get_config('tool_mobile', 'typeoflogin');
|
||||
|
@ -181,6 +181,11 @@ class external extends external_api {
|
||||
'locale' => new external_value(PARAM_RAW, 'Sitewide locale.', VALUE_OPTIONAL),
|
||||
'tool_mobile_minimumversion' => new external_value(PARAM_NOTAGS, 'Minimum required version to access.',
|
||||
VALUE_OPTIONAL),
|
||||
'tool_mobile_iosappid' => new external_value(PARAM_ALPHANUM, 'iOS app\'s unique identifier.',
|
||||
VALUE_OPTIONAL),
|
||||
'tool_mobile_androidappid' => new external_value(PARAM_NOTAGS, 'Android app\'s unique identifier.',
|
||||
VALUE_OPTIONAL),
|
||||
'tool_mobile_setuplink' => new external_value(PARAM_URL, 'App download page.', VALUE_OPTIONAL),
|
||||
'warnings' => new external_warnings(),
|
||||
)
|
||||
);
|
||||
|
@ -96,6 +96,9 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
|
||||
'langlist' => $CFG->langlist,
|
||||
'locale' => $CFG->locale,
|
||||
'tool_mobile_minimumversion' => '',
|
||||
'tool_mobile_iosappid' => get_config('tool_mobile', 'iosappid'),
|
||||
'tool_mobile_androidappid' => get_config('tool_mobile', 'androidappid'),
|
||||
'tool_mobile_setuplink' => get_config('tool_mobile', 'setuplink'),
|
||||
'warnings' => array()
|
||||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user