Merge branch 'MDL-82234-main' of https://github.com/durenadev/moodle

This commit is contained in:
Sara Arjona 2024-07-09 10:08:06 +02:00 committed by Ilya Tregubov
commit 48658eb73b
3 changed files with 4 additions and 1 deletions

View File

@ -213,6 +213,7 @@ class api {
'tool_mobile_qrcodetype' => clean_param(get_config('tool_mobile', 'qrcodetype'), PARAM_INT),
'supportpage' => $sitesupportavailable ? clean_param($CFG->supportpage, PARAM_URL) : '',
'supportavailability' => clean_param($CFG->supportavailability, PARAM_INT),
'showloginform' => (int) get_config('core', 'showloginform'),
);
$typeoflogin = get_config('tool_mobile', 'typeoflogin');

View File

@ -191,6 +191,7 @@ class external extends external_api {
'tool_mobile_setuplink' => new external_value(PARAM_URL, 'App download page.', VALUE_OPTIONAL),
'tool_mobile_qrcodetype' => new external_value(PARAM_INT, 'QR login configuration.', VALUE_OPTIONAL),
'warnings' => new external_warnings(),
'showloginform' => new external_value(PARAM_INT, 'Display default login form.'),
)
);
}

View File

@ -102,7 +102,8 @@ class externallib_test extends externallib_advanced_testcase {
'tool_mobile_qrcodetype' => get_config('tool_mobile', 'qrcodetype'),
'supportpage' => $CFG->supportpage,
'supportavailability' => $CFG->supportavailability,
'warnings' => array()
'warnings' => [],
'showloginform' => (int) get_config('core', 'showloginform'),
);
$this->assertEquals($expected, $result);