MDL-67814 h5p: recover missed xAPI settings

This commit is contained in:
Sara Arjona
2020-04-16 09:36:05 +01:00
committed by Víctor Déniz Falcón
parent 1e33203b82
commit 2ac1d9aedf
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -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,
+2
View File
@@ -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