summaryrefslogtreecommitdiff
path: root/testapp/templates/exam/quizzes_user.html
blob: c284b87cfe20760c2f0d4d9479afd0134df40b2d (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{% extends "user.html" %}


{% block subtitle %}Hello {{ user.first_name }}, welcome to your dashboard !{% endblock %}

{% block css %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
{% endblock %}

{% block script %}
<script src="{{ URL_ROOT }}/static/exam/js/bootstrap-alert.js"></script>
<script src="{{ URL_ROOT }}/static/exam/js/quizzes_user.js"></script>
{% endblock %}


{% block manage %}
    {% if cannot_attempt %}
        <p>You have not passed the prerequisite & hence you cannot take the quiz.</p>
    {% endif %}
    <h4>List of quizzes availbale for you</h4>
    {% if not quizzes %}
        <h5>No active quizzes for you</h5>
    {% endif %}
    <table>
    <th>Quiz</th>
    <th>Pre requisite quiz</th>
    {% for paper in quizzes %}
        <tr>
            <td>
                <a href="{{ URL_ROOT }}/exam/intro/{{paper.id}}">{{ paper.quiz.description }}</a><br>
            </td>
            <td>
                {% if paper.quiz.prerequisite %}
                    You have to pass <a href="{{ URL_ROOT }}/exam/intro/{{paper.quiz.prerequisite.id}}">{{ paper.quiz.prerequisite.description }}</a> for taking <a href="{{ URL_ROOT }}/exam/intro/{{paper.id}}">{{ paper.quiz.description }}</a>
                {% else %}
                    No pre requisites for {{ paper.quiz.description }}
                {% endif %}
            </td>
        </tr>
    {% endfor %}
    </table>
    <hr>    
    <h4>List of quizzes taken by you so far</h4>
    {% if quizzes_taken %}
        <table>
            <th>Quiz</th>
            <th>Result</th>
            <th>Mraks Obtained</th>
            <th>Total Marks</th>
            <th>Percentage</th>
        {% for paper in quizzes_taken %}
            <tr>
                <td>
                    {{ paper.question_paper.quiz.description }}
                </td>
                <td>
                    {% if paper.passed %}
                        <p>Pass</p>
                    {% else %}
                        <p>Fail</p>
                    {% endif %}
                </td>
                <td>
                    {{ paper.marks_obtained }}
                </td>
                <td>
                    {{ paper.question_paper.total_marks }}
                </td>
                <td>
                    {{ paper.percent }}
                </td>
            </tr>
        {% endfor %}
        </table>
    {% else %}
        <p>You have not taken any quiz yet !!</p>
    {% endif %}


{% endblock %}