'fullname' => fullname($USER),
'lang' => current_language(),
'userid' => $USER->id,
- 'userpictureurl' => $profileimageurl->out(false)
+ 'userpictureurl' => $profileimageurl->out(false),
+ 'siteid' => SITEID
);
// Retrieve the service and functions from the web service linked to the token
VALUE_OPTIONAL),
'userhomepage' => new external_value(PARAM_INT,
'the default home page for the user: 0 for the site home, 1 for dashboard',
- VALUE_OPTIONAL)
+ VALUE_OPTIONAL),
+ 'siteid' => new external_value(PARAM_INT, 'Site course ID', VALUE_OPTIONAL)
)
);
}
$this->assertEquals('Doe', $siteinfo['lastname']);
$this->assertEquals(current_language(), $siteinfo['lang']);
$this->assertEquals($USER->id, $siteinfo['userid']);
+ $this->assertEquals(SITEID, $siteinfo['siteid']);
$this->assertEquals(true, $siteinfo['downloadfiles']);
$this->assertEquals($CFG->release, $siteinfo['release']);
$this->assertEquals($CFG->version, $siteinfo['version']);
* external_format_text() function: component, filearea and itemid are now optional parameters.
In some contexts those parameteres are not necessary because is not required to do a file rewrite via
file_rewrite_pluginfile_urls.
+* External function get_site_info now returns the site course ID. This new field is marked as VALUE_OPTIONAL for backwards compatibility.
=== 3.1 ===