mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-67788 h5p: fix issue for non logged-in users
This commit is contained in:
parent
2ac1d9aedf
commit
0a05ca3604
@ -312,6 +312,8 @@ class helper {
|
||||
$factory = new factory();
|
||||
$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] : [];
|
||||
$settings = array(
|
||||
'baseUrl' => $basepath,
|
||||
'url' => "{$basepath}pluginfile.php/{$systemcontext->instanceid}/core_h5p",
|
||||
@ -321,7 +323,7 @@ class helper {
|
||||
'saveFreq' => false,
|
||||
'siteUrl' => $CFG->wwwroot,
|
||||
'l10n' => array('H5P' => $core->getLocalization()),
|
||||
'user' => ['name' => $USER->username, 'mail' => $USER->email],
|
||||
'user' => $usersettings,
|
||||
'hubIsEnabled' => true,
|
||||
'reportingIsEnabled' => false,
|
||||
'crossorigin' => null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user