MDL-73608 tool_mobile: Return support page for not logged-in users

This commit is contained in:
Juan Leyva
2022-02-17 19:48:30 +08:00
committed by Simey Lameze
parent d24a4ab56f
commit f0816126bf
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -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');
+1
View File
@@ -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);