Skip to content
Snippets Groups Projects
Commit 6cb11c0b authored by Anthony's avatar Anthony
Browse files

Improve summary displaying

parent f9b7b982
Branches
No related tags found
No related merge requests found
Pipeline #2072 passed
......@@ -167,7 +167,8 @@ $(function () {
if (sender.isSurveySummaryVisible) {
console.log("Survey summary is visible");
const userData = sender.data;
const summaryDiv = document.getElementById("surveySummary");
const summaryDiv = document.createElement("div");
summaryDiv.id = "surveySummary";
let html = "<h3>Your Results:</h3><ul>";
sender.getAllQuestions().forEach(q => {
......@@ -185,6 +186,10 @@ $(function () {
html += "</ul>";
summaryDiv.innerHTML = html;
// Append the summary after the survey container
document.getElementById("surveyContainer").appendChild(summaryDiv);
}
});
......
......@@ -8,4 +8,3 @@ Activité pour tests en développement
{{< quiz >}}
<div id="surveySummary" style="margin-top: 2rem;"></div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment