JI-2862 Make scoring and reporting flags available (#108)

- For community users
attempts-control
Ravi Majithia 2021-10-26 15:32:18 +02:00 committed by GitHub
parent aaf26d584b
commit 19c0f86635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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!