mirror of
https://github.com/moodle/moodle.git
synced 2025-04-17 22:45:54 +02:00
MDL-67814 h5p: recover missed xAPI settings
This commit is contained in:
parent
1e33203b82
commit
2ac1d9aedf
h5p/classes
@ -299,7 +299,7 @@ class helper {
|
||||
* @return array The settings.
|
||||
*/
|
||||
public static function get_core_settings(): array {
|
||||
global $CFG;
|
||||
global $CFG, $USER;
|
||||
|
||||
$basepath = $CFG->wwwroot . '/';
|
||||
$systemcontext = context_system::instance();
|
||||
@ -321,7 +321,7 @@ class helper {
|
||||
'saveFreq' => false,
|
||||
'siteUrl' => $CFG->wwwroot,
|
||||
'l10n' => array('H5P' => $core->getLocalization()),
|
||||
'user' => [],
|
||||
'user' => ['name' => $USER->username, 'mail' => $USER->email],
|
||||
'hubIsEnabled' => true,
|
||||
'reportingIsEnabled' => false,
|
||||
'crossorigin' => null,
|
||||
|
@ -614,6 +614,8 @@ class player {
|
||||
$settings = helper::get_core_assets();
|
||||
// Added here because in the helper we don't have the h5p content id.
|
||||
$settings['moodleLibraryPaths'] = $this->core->get_dependency_roots($this->h5pid);
|
||||
// Add also the Moodle component where the results will be tracked.
|
||||
$settings['moodleComponent'] = $this->component;
|
||||
|
||||
$cid = $this->get_cid();
|
||||
// The filterParameters function should be called before getting the dependencyfiles because it rebuild content
|
||||
|
Loading…
x
Reference in New Issue
Block a user