fix du quizz
This commit is contained in:
@@ -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 %}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user