summaryrefslogtreecommitdiff
path: root/static/website/templates/take_quiz.html
blob: 15bb05e5a78a75841ad6b33558d8615bd1d0c5f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{% extends "base.html" %}

{% load static %}
 {% block content %}
<br><br><br><br>
<div class="container">

        {% if messages %}
		<ul class="messages">
		    {% for message in messages %}
		    	<div class="alert alert-{{ message.tags }}">
				    <li {% if message.tags %} class="{{ message.tags }}"{% endif %}> {{ message }}
				    </li>
			    </div>
		    {% endfor %}
		</ul>
    {% endif %}
    
    {% if question_list is None %}
        <div class="alert alert-success">
            <strong>You've Already taken the quiz, please come tomorrow for other questions!</strong> 
        </div>
    {% else %}
   <form method="POST">
       {% csrf_token %}
    <div class="question_one">
    <strong>{{ question_list.0.question | safe }}</strong><br>
    <input type="radio" value="{{question_list.0.option_1}}" name="q1"> {{ question_list.0.option_1 }}<br>
    <input type="radio" value="{{question_list.0.option_2}}" name="q1"> {{ question_list.0.option_2 }}<br>
    <input type="radio" value="{{question_list.0.option_3}}" name="q1"> {{ question_list.0.option_3 }}<br>
    <input type="radio" value="{{question_list.0.option_4}}" name="q1"> {{ question_list.0.option_4 }}<br>
    <br> <br> <br>
    </div>
   
    <div class="question_two">
        <strong>{{ question_list.1.question | safe }}</strong><br>
        <input type="radio" value="{{question_list.1.option_1}}" name="q2"> {{ question_list.1.option_1 }}<br>
        <input type="radio" value="{{question_list.1.option_2}}" name="q2"> {{ question_list.1.option_2 }}<br>
        <input type="radio" value="{{question_list.1.option_3}}" name="q2"> {{ question_list.1.option_3 }}<br>
        <input type="radio" value="{{question_list.1.option_4}}" name="q2"> {{ question_list.1.option_4 }}<br>
        <br>
    </div>
    <button class="btn btn-primary center-block" type="Submit">Submit</button> <br>
    </form>
    {% endif %}

</div>
  {% endblock %}