1
0
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:
Sara Arjona 2020-04-16 10:17:34 +02:00 committed by Víctor Déniz Falcón
parent 1e33203b82
commit 2ac1d9aedf
2 changed files with 4 additions and 2 deletions

@ -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