From 19c0f8663515a26b598d660437fbb103879fc02e Mon Sep 17 00:00:00 2001 From: Ravi Majithia <77275193+ravimajithia@users.noreply.github.com> Date: Tue, 26 Oct 2021 15:32:18 +0200 Subject: [PATCH] JI-2862 Make scoring and reporting flags available (#108) - For community users --- js/h5p.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/h5p.js b/js/h5p.js index e71a0d6..21f1cba 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -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!