You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've installed recently your RTL version of H5P module in our Moodle environment and I am facing an issue with the latest Moodle version (3.9) and the Dictation H5P content type specifically. The H5P content iframe is not loaded and there is a JS error in the browser console:
Uncaught TypeError: Cannot read property 'getUsersScore' of undefined
at t. (h5p-x-api.js?ver=2020020500:125)
at t.call (h5p-event-dispatcher.js?ver=2020020500:209)
at t.EventDispatcher.trigger (h5p-event-dispatcher.js?ver=2020020500:240)
at t.EventDispatcher.trigger (h5p-event-dispatcher.js?ver=2020020500:252)
at t.s.triggerXAPI (7a4e5e109e08eee9a4ca156fff00be30b03cf770.js:4417)
at t.H5P.EventDispatcher.setActivityStarted (h5p-x-api.js?ver=2020020500:101)
at t.Question.self.attach (7a4e5e109e08eee9a4ca156fff00be30b03cf770.js:3331)
at Object.H5P.newRunnable (h5p.js?ver=2020020500:984)
at HTMLDivElement. (h5p.js?ver=2020020500:141)
at Function.each (jquery.js?ver=2020020500:2)
This H5P content item was downloaded from their examples site. The rest of the h5p CTs are loaded all right. Tried in different Moodle themes, same result. If I use latest upstream version of H5P (1.21) the problem disappears and Dictation H5P iframe is displayed. I would be grateful if you can confirm the issue and eventually suggest a fix.
Thank you!
Emil
The text was updated successfully, but these errors were encountered:
For the time being I was able to bypass the error by commenting few lines in library/js/h5p-x-api.js , the last function
H5P.externalDispatcher.on('xAPI', function (event) {
// if (event.getVerb() === 'answered' &&
if (event.getVerb() === 'answered') {
// And in case we have some interactive content inside "slides"...
// typeof this.parent.getUsersScore !== "undefined") {
// var total_score = this.parent.getUsersScore();
// var total_maxScore = this.parent.getUsersMaxScore();
var contentId = event.getVerifiedStatementValue(
['object', 'definition', 'extensions', 'http://h5p.org/x-api/h5p-local-content-id']);
if (H5P.opened[contentId] === undefined) {
H5P.opened[contentId] = new Date();
}
// H5P.setFinished(contentId, total_score, total_maxScore);
}
});
but in this way I think score reporting functionality is lost.
Hi, I've installed recently your RTL version of H5P module in our Moodle environment and I am facing an issue with the latest Moodle version (3.9) and the Dictation H5P content type specifically. The H5P content iframe is not loaded and there is a JS error in the browser console:
Uncaught TypeError: Cannot read property 'getUsersScore' of undefined
at t. (h5p-x-api.js?ver=2020020500:125)
at t.call (h5p-event-dispatcher.js?ver=2020020500:209)
at t.EventDispatcher.trigger (h5p-event-dispatcher.js?ver=2020020500:240)
at t.EventDispatcher.trigger (h5p-event-dispatcher.js?ver=2020020500:252)
at t.s.triggerXAPI (7a4e5e109e08eee9a4ca156fff00be30b03cf770.js:4417)
at t.H5P.EventDispatcher.setActivityStarted (h5p-x-api.js?ver=2020020500:101)
at t.Question.self.attach (7a4e5e109e08eee9a4ca156fff00be30b03cf770.js:3331)
at Object.H5P.newRunnable (h5p.js?ver=2020020500:984)
at HTMLDivElement. (h5p.js?ver=2020020500:141)
at Function.each (jquery.js?ver=2020020500:2)
This H5P content item was downloaded from their examples site. The rest of the h5p CTs are loaded all right. Tried in different Moodle themes, same result. If I use latest upstream version of H5P (1.21) the problem disappears and Dictation H5P iframe is displayed. I would be grateful if you can confirm the issue and eventually suggest a fix.
Thank you!
Emil
The text was updated successfully, but these errors were encountered: