mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-35998 get_site_info return current_language()
This commit is contained in:
parent
489987af77
commit
92fa81d387
@ -87,6 +87,7 @@ class core_webservice_external extends external_api {
|
||||
'firstname' => $USER->firstname,
|
||||
'lastname' => $USER->lastname,
|
||||
'fullname' => fullname($USER),
|
||||
'lang' => current_language(),
|
||||
'userid' => $USER->id,
|
||||
'userpictureurl' => $profileimageurl->out(false)
|
||||
);
|
||||
@ -175,6 +176,7 @@ class core_webservice_external extends external_api {
|
||||
'firstname' => new external_value(PARAM_TEXT, 'first name'),
|
||||
'lastname' => new external_value(PARAM_TEXT, 'last name'),
|
||||
'fullname' => new external_value(PARAM_TEXT, 'user full name'),
|
||||
'lang' => new external_value(PARAM_LANG, 'user language'),
|
||||
'userid' => new external_value(PARAM_INT, 'user id'),
|
||||
'siteurl' => new external_value(PARAM_RAW, 'site url'),
|
||||
'userpictureurl' => new external_value(PARAM_URL, 'the user profile picture.
|
||||
|
@ -80,6 +80,7 @@ class core_webservice_external_testcase extends externallib_advanced_testcase {
|
||||
$this->assertEquals('johnd', $siteinfo['username']);
|
||||
$this->assertEquals('John', $siteinfo['firstname']);
|
||||
$this->assertEquals('Doe', $siteinfo['lastname']);
|
||||
$this->assertEquals(current_language(), $siteinfo['lang']);
|
||||
$this->assertEquals($USER->id, $siteinfo['userid']);
|
||||
$this->assertEquals(true, $siteinfo['downloadfiles']);
|
||||
$this->assertEquals($CFG->release, $siteinfo['release']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user