JI-2862 Make scoring and reporting flags available

- For community users
pull/108/head
Ravi Majithia 2021-10-19 15:07:43 +02:00
parent aaf26d584b
commit fa55cee9a2
1 changed files with 4 additions and 0 deletions

View File

@ -929,6 +929,10 @@ H5P.newRunnable = function (library, contentId, $attachTo, skipResize, extras) {
extras.metadata = library.metadata;
}
extras.isScoringEnabled = (library.isScoringEnabled !== undefined ? library.isScoringEnabled : !!H5PIntegration.postUserStatistics);
extras.isReportingAvailable = (library.isReportingAvailable !== undefined ? library.isReportingAvailable : !!H5PIntegration.reportingIsAvailable);
extras.isReportingEnabled = (library.isReportingEnabled !== undefined ? library.isReportingEnabled : !!H5PIntegration.reportingIsEnabled);
// Makes all H5P libraries extend H5P.ContentType:
var standalone = extras.standalone || false;
// This order makes it possible for an H5P library to override H5P.ContentType functions!