summaryrefslogtreecommitdiffstats
path: root/theme/templates/includes/book/quiz.html
blob: c315a16082ee490ad511bdcf10ab060d003c9712 (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
<div class="header">
    <h2>Quiz</h2>
</div>

<div class="message">
    {% autoescape false %}{{ section.content }}{% endautoescape %}
</div>


{% for quiz in section.quiz %}
<div class="question">
    <div class="question-header">Question {{ loop.index }} of {{ section.quiz.length }}</div>

    <div class="question-content">
        <div class="alert alert-success hidden">
            <b>Correct!</b>
        </div>

        <div class="alert alert-danger error-message hidden">
            <p><b>Not quite!</b></p>
            {% autoescape false %}{{ quiz.feedback }}{% endautoescape %}
        </div>

        <div class="question-inner">
        {% autoescape false %}{{ quiz.base }}{% endautoescape %}
        </div>
    </div>

    <div class="hidden question-answers">
        <div class="question-inner">
        {% autoescape false %}{{ quiz.solution }}{% endautoescape %}
        </div>
    </div>
</div>
{% endfor %}

<div class="btn-group btn-group-justified">
    <a href="#" class="btn btn-default action-submit">Submit</a>
    <a href="#" class="btn btn-default action-solution">Solution</a>
    {% if githubId %}
    <a href="{{ githubHost }}{{ githubId }}/issues/new" target="_blank" class="btn btn-default">Have a Question?</a>
    {% endif %}
</div>