mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-69810 tool_mobile: Return support contact information via WS
This commit is contained in:
parent
87afa4d759
commit
09cc128f95
2 changed files with 10 additions and 0 deletions
|
@ -323,6 +323,12 @@ class api {
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($section) or $section == 'supportcontact') {
|
||||
$settings->supportname = $CFG->supportname;
|
||||
$settings->supportemail = $CFG->supportemail;
|
||||
$settings->supportpage = $CFG->supportpage;
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
|
|
|
@ -230,6 +230,10 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
|
|||
'value' => get_config('core_admin', 'coursecolor' . $number)
|
||||
];
|
||||
}
|
||||
$expected[] = ['name' => 'supportname', 'value' => $CFG->supportname];
|
||||
$expected[] = ['name' => 'supportemail', 'value' => $CFG->supportemail];
|
||||
$expected[] = ['name' => 'supportpage', 'value' => $CFG->supportpage];
|
||||
|
||||
$this->assertCount(0, $result['warnings']);
|
||||
$this->assertEquals($expected, $result['settings']);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue