diff --git a/macao/assets/custom.js b/macao/assets/custom.js index 8aa55710a5d96edaf982483f153935da8a7474f6..034a11d137f24f0147d5b0361abb30acba83b02c 100644 --- a/macao/assets/custom.js +++ b/macao/assets/custom.js @@ -1,5 +1,6 @@ +console.log('Custom JS loaded'); $(document).ready(function() { - console.log('Custom JS loaded'); + console.log('Custom JS executed'); // Add specific classes to play buttons $('button:contains("Play")').html('<i class="fa-solid fa-play"></i>'); }); diff --git a/macao/assets/quiz.js b/macao/assets/quiz.js index e441f1ae61ff787b1c81b0a44a3212d52a4ca3c9..1690efe5d996ea8ad5a0ebd0ec5d5f0b38db3920 100644 --- a/macao/assets/quiz.js +++ b/macao/assets/quiz.js @@ -1,7 +1,7 @@ /** * Checks whether all questions are correctly answered and displays the overall feedback. */ -function checkAllQuestions(questions, surveyConfig) { +function checkAllQuestions(questions, surveyConfig, converter) { let allCorrect = true; questions.forEach((question) => { @@ -12,10 +12,10 @@ function checkAllQuestions(questions, surveyConfig) { if (allCorrect) { correctIndic.node.className = "correct"; - correctIndic.commentNode.innerHTML = surveyConfig.correctComment || "All answers are correct!"; + correctIndic.commentNode.innerHTML = converter.renderInline(surveyConfig.correctComment) || "All answers are correct!"; } else { correctIndic.node.className = "incorrect"; - correctIndic.commentNode.innerHTML = surveyConfig.incorrectComment || "Some answers are incorrect!"; + correctIndic.commentNode.innerHTML = converter.renderInline(surveyConfig.incorrectComment) || "Some answers are incorrect!"; } } @@ -79,7 +79,7 @@ $(function () { id: "sv-nav-check", title: "Vérifier", action: () => { - checkAllQuestions(survey.currentPage.questions, jsonStatic); + checkAllQuestions(survey.currentPage.questions, jsonStatic, converter); }, css: "nav-button", innerCss: "sd-btn sd-btn--action nav-input"