From 9b6b5995e97d89cc875083b0f9650115ac7d9921 Mon Sep 17 00:00:00 2001 From: Priit Tammets Date: Fri, 24 Apr 2026 13:41:10 +0300 Subject: [PATCH 1/2] Restore feedback-section wrapper so overall feedback and score bar render The refactor to H5P.Components.ResultScreen stopped emitting the .feedback-section / .feedback-scorebar / .feedback-text elements, but _displayEndGame still populates them via jQuery selectors. As a result the overall feedback text and score bar were computed but never rendered. Re-adds the feedback-section wrapper inside the result page so the existing append logic has real targets again. Fixes #183 --- js/questionset.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/questionset.js b/js/questionset.js index e01600dd..67901eec 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -688,6 +688,15 @@ H5P.QuestionSet = function (options, contentId, contentData) { }); } + // Restore feedback-section wrapper removed in VA-460 so the + // overall feedback text and score bar have a place to render. + self.$feedbackSection = $( + '
' + + '' + + '' + + '
' + ).appendTo(self.$resultPage); + self.$buttonsContainer = $('
', { class: 'buttons', appendTo: self.$resultPage From c081ac6e43ce6df70fb271e20ad80d0de1d52c25 Mon Sep 17 00:00:00 2001 From: Priit Tammets Date: Fri, 24 Apr 2026 13:45:47 +0300 Subject: [PATCH 2/2] Address review: drop unused self.$feedbackSection, use jQuery object form --- js/questionset.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index 67901eec..3d008ba9 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -690,12 +690,14 @@ H5P.QuestionSet = function (options, contentId, contentData) { // Restore feedback-section wrapper removed in VA-460 so the // overall feedback text and score bar have a place to render. - self.$feedbackSection = $( - '' - ).appendTo(self.$resultPage); + $('
', { + class: 'feedback-section', + append: [ + $('
', { class: 'feedback-scorebar' }), + $('
', { class: 'feedback-text' }) + ], + appendTo: self.$resultPage + }); self.$buttonsContainer = $('
', { class: 'buttons',