MDL-78820 h5p: use fullname of current user as the xAPI actor name.

This commit is contained in:
Paul Holden
2023-10-04 02:07:15 +02:00
committed by Jenkins
parent ead9bafb54
commit c22b94aea7
+5 -1
View File
@@ -343,7 +343,11 @@ class helper {
$core = $factory->get_core();
// When there is a logged in user, her information will be passed to the player. It will be used for tracking.
$usersettings = isloggedin() ? ['name' => $USER->username, 'mail' => $USER->email] : [];
$usersettings = [];
if (isloggedin()) {
$usersettings['name'] = fullname($USER, has_capability('moodle/site:viewfullnames', $systemcontext));
$usersettings['mail'] = $USER->email;
}
$settings = array(
'baseUrl' => $basepath,
'url' => "{$basepath}pluginfile.php/{$systemcontext->instanceid}/core_h5p",