-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtemplates.php
More file actions
71 lines (71 loc) · 3.33 KB
/
templates.php
File metadata and controls
71 lines (71 loc) · 3.33 KB
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
<script id="short_answer_question" type="text/x-handlebars-template">
<li>
<p id="{{code}}_q">
{{#if scored}}{{#if correct}}
<span class="sr-only">Correct. </span><i class="fa fa-check text-success" aria-hidden="true"></i>
{{else}}
<span class="sr-only">Incorrect. </span><i class="fa fa-times text-danger" aria-hidden="true"></i>
{{/if}} {{/if}}
{{{question}}}</p>
<p><label for="{{code}}_input" class="sr-only">Your answer for question above</label><input type="text" id="{{code}}_input" name="{{code}}" value="{{value}}" size="80" aria-labelledby="{{code}}_q"/></p>
</li>
</script>
<script id="essay_question" type="text/x-handlebars-template">
<li>
<p id="{{code}}_q">
{{#if scored}}{{#if correct}}
<span class="sr-only">Correct. </span><i class="fa fa-check text-success" aria-hidden="true"></i>
{{else}}
<span class="sr-only">Incorrect. </span><i class="fa fa-times text-danger" aria-hidden="true"></i>
{{/if}} {{/if}}
{{{question}}}</p>
<p><label for="{{code}}_input" class="sr-only">Your answer for question above</label><textarea id="{{code}}_input" name="{{code}}" style="width:100%;" aria-labelledby="{{code}}_q">{{value}}</textarea></p>
</li>
</script>
<script id="multiple_answers_question" type="text/x-handlebars-template">
<li>
<p id="{{code}}_q">
{{#if scored}}{{#if correct}}
<span class="sr-only">Correct. </span><i class="fa fa-check text-success" aria-hidden="true"></i>
{{else}}
<span class="sr-only">Incorrect. </span><i class="fa fa-times text-danger" aria-hidden="true"></i>
{{/if}} {{/if}}
{{{question}}}</p>
<div role="group" aria-labelledby="{{code}}_q">
{{#each answers}}
<p><input type="checkbox" id="{{../code}}_{{@index}}" name="{{code}}" {{#if checked}}checked{{/if}} value="true"/> <label for="{{../code}}_{{@index}}">{{text}}</label></p>
{{/each}}
</div>
</li>
</script>
<script id="true_false_question" type="text/x-handlebars-template">
<li>
<p id="{{code}}_q">
{{#if scored}}{{#if correct}}
<span class="sr-only">Correct. </span><i class="fa fa-check text-success" aria-hidden="true"></i>
{{else}}
<span class="sr-only">Incorrect. </span><i class="fa fa-times text-danger" aria-hidden="true"></i>
{{/if}} {{/if}}
{{{question}}}</p>
<p role="group" aria-labelledby="{{code}}_q">
<input type="radio" id="{{code}}_T" name="{{code}}" {{#if value_true}}checked{{/if}} value="T"/> <label for="{{code}}_T">True</label>
<input type="radio" id="{{code}}_F" name="{{code}}" {{#if value_false}}checked{{/if}} value="F"/> <label for="{{code}}_F">False</label>
</p>
</li>
</script>
<script id="multiple_choice_question" type="text/x-handlebars-template">
<li>
<p id="{{code}}_q">
{{#if scored}}{{#if correct}}
<span class="sr-only">Correct. </span><i class="fa fa-check text-success" aria-hidden="true"></i>
{{else}}
<span class="sr-only">Incorrect. </span><i class="fa fa-times text-danger" aria-hidden="true"></i>
{{/if}} {{/if}}
{{{question}}}</p>
<div role="group" aria-labelledby="{{code}}_q">
{{#each answers}}
<p><input type="radio" id="{{../code}}_{{@index}}" name="{{../code}}" {{#if checked}}checked{{/if}} value="{{code}}"/> <label for="{{../code}}_{{@index}}">{{text}}</label></p>
{{/each}}
</div>
</li>
</script>