-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathquiz.xhtml
94 lines (82 loc) · 3.05 KB
/
quiz.xhtml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="quiz.css" />
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.10.3.custom.min.js"></script>
<script type="text/javascript" src="jquery.inherit-1.1.1.js"></script>
<script type="text/javascript" src="jquery.localize.js"></script>
<script type="text/javascript" src="json2.min.js"></script>
<script type="text/javascript" src="quiz.js"></script>
<script type="text/javascript" src="config.js"></script>
</head>
<body>
<div id="waiting"><img src="waiting.gif"/></div>
<div id="controlButtons" class="hidden">
<input type="button" id="prevQuestionButton" rel="localize[buttons.prev]" value="<" />
<input type="button" id="nextQuestionButton" rel="localize[buttons.next]" value=">" />
<span id="questionNumbers">
<input type="button" class="hidden" />
</span>
<input type="button" id="checkAnswersButton" class="hidden" rel="localize[buttons.check]" value="Check" />
<input type="button" id="submitAnswersButton" class="hidden" rel="localize[buttons.submit]" value="Submit" />
<span id="confirmSubmit" rel="localize[messages.confirmSubmit]" class="hidden"/>
<span id="submitSuccess" rel="localize[messages.submitSuccess]" class="hidden"/>
</div>
<div id="questionText" class="hidden">Question text</div>
<p><select id="optionsSelect" class="hidden"></select></p>
<div id="singleChoice" class="question hidden">
<ul>
<li class="variantTemplate hidden">
<input type="radio" name="variant" /><label>answer text</label>
</li>
</ul>
</div>
<div id="multiChoice" class="question hidden">
<ul>
<li class="variantTemplate hidden">
<input type="checkbox" name="variant" /><label>answer text</label>
</li>
</ul>
</div>
<div id="directInput" class="question hidden">
<input type="text" value="" />
</div>
<div id="sortable" class="question sortable hidden">
<ul class="sortableList" id="srVariants">
<li class="variantTemplate hidden">variant text</li>
</ul>
</div>
<div id="match" class="question sortable hidden">
<ul id="mtStatic">
<li class="variantTemplate hidden">label text</li>
</ul>
<ul class="sortableList" id="mtVariants">
<li class="variantTemplate hidden">variant text</li>
</ul>
</div>
<div id="construct" class="question sortable hidden">
<ul class="sortableList" id="cnAnswer">
<li class="variantTemplate hidden">answer item text</li>
</ul>
<div class="arrow">⇐</div>
<ul class="sortableList" id="cnVariants">
<li class="variantTemplate hidden">variant text</li>
</ul>
</div>
<div id="checkAnswers" class="hidden">
<table class="bordered">
<tr><th>Question</th><th>Answer</th><th>Correct answer</th></tr>
<tr id="checkAnswerRow" class="hidden"><td></td><td></td><td></td></tr>
</table>
</div>
<script type="text/javascript">
// Avoid "not well-formed" error when loading JSON from local file.
$.ajaxSetup({
beforeSend: function(req) { req.overrideMimeType('application/json'); },
});
$('[rel^=localize]').localize('lang/quiz');
quiz_init(new Quiz());
</script>
</body>
</html>