MDL-73608 tool_mobile: Return support page for not logged-in users
This commit is contained in:
@@ -198,6 +198,7 @@ class api {
|
||||
'tool_mobile_androidappid' => get_config('tool_mobile', 'androidappid'),
|
||||
'tool_mobile_setuplink' => clean_param(get_config('tool_mobile', 'setuplink'), PARAM_URL),
|
||||
'tool_mobile_qrcodetype' => clean_param(get_config('tool_mobile', 'qrcodetype'), PARAM_INT),
|
||||
'supportpage' => clean_param($CFG->supportpage, PARAM_URL),
|
||||
);
|
||||
|
||||
$typeoflogin = get_config('tool_mobile', 'typeoflogin');
|
||||
|
||||
@@ -174,6 +174,7 @@ class external extends external_api {
|
||||
(only if age verification is enabled).', VALUE_OPTIONAL),
|
||||
'supportemail' => new external_value(PARAM_EMAIL, 'Site support contact email
|
||||
(only if age verification is enabled).', VALUE_OPTIONAL),
|
||||
'supportpage' => new external_value(PARAM_URL, 'Site support page link.', VALUE_OPTIONAL),
|
||||
'autolang' => new external_value(PARAM_INT, 'Whether to detect default language
|
||||
from browser setting.', VALUE_OPTIONAL),
|
||||
'lang' => new external_value(PARAM_LANG, 'Default language for the site.', VALUE_OPTIONAL),
|
||||
|
||||
@@ -91,6 +91,7 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
'tool_mobile_androidappid' => get_config('tool_mobile', 'androidappid'),
|
||||
'tool_mobile_setuplink' => get_config('tool_mobile', 'setuplink'),
|
||||
'tool_mobile_qrcodetype' => get_config('tool_mobile', 'qrcodetype'),
|
||||
'supportpage' => $CFG->supportpage,
|
||||
'warnings' => array()
|
||||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
Reference in New Issue
Block a user