MOBILE-3666 h5p: Enable player reporting

main
Dani Palou 2020-12-17 08:44:06 +01:00
parent 7956d8e563
commit 6e98c43651
2 changed files with 5 additions and 0 deletions

View File

@ -39,6 +39,9 @@ if (window.H5PIntegration && window.H5PIntegration.contents && location.search)
}
} else if (nameAndValue[0] == 'component') {
window.H5PIntegration.moodleComponent = nameAndValue[1];
if (window.H5PIntegration.moodleComponent) {
window.H5PIntegration.reportingIsEnabled = true;
}
} else if (nameAndValue[0] == 'trackingUrl' && contentData) {
contentData.url = nameAndValue[1];
}

View File

@ -226,6 +226,8 @@ export class CoreH5PPlayer {
settings.moodleLibraryPaths = await this.h5pCore.getDependencyRoots(id);
// The Moodle component is added dynamically using the params.js script instead of doing it here.
/* The filterParameters function should be called before getting the dependency files because it rebuilds content
dependency cache. */
settings.contents[contentId].jsonContent = await this.h5pCore.filterParameters(content, siteId);