fix du quizz

This commit is contained in:
Your Name
2025-12-05 03:42:04 +01:00
parent 0a95a72cbb
commit 36edabe1da
4 changed files with 63 additions and 38 deletions

View File

@@ -1,10 +1,10 @@
{% for q in questions %}
<div class="test" id="test1">
{% for q in questions.questions %}
<div class="test" id="test{{q.nb}}">
<h2>{{q.question}}</h2>
{% for a in q.answer%}
<label class="ans">{{a.answer}}<input id="tgl{{a.nb}}{{q.nb}}" type="checkbox" onclick=""></input></label><br>
<label class="ans">{{a.answer}}<input id="tgl{{a.nb}}{{q.nb}}" attribut="{{a.correct}}" type="checkbox" onclick=""></input></label><br>
{% endfor %}
<button class="ans" id="sub1" onclick="tog()">sub</button>
<p class="ans" id="answer1"><br></p><br>
<button class="ans" id="sub{{q.nb}}" onclick="tog({{q.nbAnswer}})">sub</button>
<p class="ans" id="answer{{q.nb}}"><br></p><br>
</div>
{% endfor %}
{% endfor %}

View File

@@ -9,7 +9,7 @@
<body>
<a href="test.html"><img class="logo" src="static/logo_n2i_color_moon.svg"></a>
<h1 id="txt">page du quiz</h1>
<button id="strt" onclick="startQuiz()">Start Quiz!</button>
<button id="strt" onclick="startQuiz({{questions.nbQuestion}})">Start Quiz!</button>
{% include 'question.html' %}
</body>
</html>