-
Notifications
You must be signed in to change notification settings - Fork 1
/
practice.html
268 lines (263 loc) · 13.2 KB
/
practice.html
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta property="og:url" content="http://canadiancitizenshiptest.co.nf/practice.html" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Practice Now!" />
<meta property="og:description" content="Canadian Citizenship Test (CCT) is a tool for people preparing to pass the Canadian Citizenship test." />
<meta property="og:image" content="https://raw.githubusercontent.com/tramyardg/cct/master/image/quiz_option.PNG" />
<title>Practice test</title>
<link href="favicon.ico" rel="icon" type="image/x-icon" />
<link href="css/bootswatch-materia.min.css" rel="stylesheet">
<link href="css/narrow-jumbotron.css" rel="stylesheet">
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="container">
<header class="header clearfix">
<nav>
<ul class="nav nav-pills float-right">
<li class="mr-2 nav-item">
<a class="btn btn-sm nav-link rounded-0" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="btn btn-sm nav-link active rounded-0" href="practice.html">Practice <span class="sr-only">(current)</span></a>
</li>
</ul>
</nav>
<h3 class="text-muted">CCT</h3>
</header>
<main role="main">
<div class="alert alert-dismissible" id="customAlert" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="alert-heading"></h4>
<p class="mb-0" id="alertBody"></p>
</div>
<div class="text-center loader-io"></div>
<div class="card mb-sm-2 mt-2 rounded-0">
<div class="card-header"><h5 class="h-m-b-0">Quiz options</h5></div>
<div class="card-body">
<form id="test-options-form" action="" method="POST" class="">
<div class="form-group row">
<label class="col-sm-5 col-form-label">Select the number of questions</label>
<div class="col-sm-4 py-sm-2">
<select name="number-of-questions" class="form-control form-control-sm" disabled>
<option value="10" selected>10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option value="50">50</option>
<option value="60">60</option>
<option value="70">70</option>
<option value="80">80</option>
</select>
</div>
</div>
<fieldset class="form-group">
<div class="row">
<label class="col-form-legend col-sm-5">
Do you want a timer? <br>
<small class="form-text text-muted">
<span>How does it work?</span> <br>
<span>10 questions = 15 minutes</span> <br>
<span>20 questions = 30 minutes</span> <br>
<span>30 questions = 45 minutes</span> <br>
<span>etc</span>
</small>
</label>
<div class="col-sm-2 py-sm-2">
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="is-set-timer" value="true" disabled>
Yes
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="is-set-timer" value="false" checked disabled>
No
</label>
</div>
</div>
</div>
</fieldset>
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-success btn-sm rounded-0" disabled>Start</button>
</div>
</div>
</form>
</div>
</div>
<form id="questions-form">
</form>
<div id="timer-box" class="mb-sm-2">Time remaining:
<span id="minutes-span" class="badge badge-dark"></span>
<span>minutes</span>
<span id="seconds-span" class="badge badge-dark"></span>
<span>seconds</span>
</div>
<div class="image-overlay">
<span class="image-overlay-close">x</span>
<img id="question-img-src" alt="image-question">
</div>
<div class="card text-center test-result mt-2 rounded-0">
<div class="card-header"><h5 class="h-m-b-0">Quiz results</h5></div>
<div class="card-body">
<div class="result-card-container">
<div class="result-item-left">
<h6>Number of questions answered</h6>
</div>
<div class="result-item-right">
<div id="total-questions-answered">0</div>
</div>
</div>
<div class="result-card-container">
<div class="result-item-left">
<h6>Number of correct answers</h6>
</div>
<div class="result-item-right">
<div id="correct-questions">0</div>
</div>
</div>
<div class="result-card-container">
<div class="result-item-left">
<h6>Accuracy</h6>
</div>
<div class="result-item-right">
<div id="accuracy"><span>%</span></div>
</div>
</div>
<div class="result-card-container">
<div class="result-item-left">
<h6>Time taken (min:sec)</h6>
</div>
<div class="result-item-right">
<div id="time-taken"></div>
</div>
</div>
<button class="btn btn-primary btn-sm" type="button" data-toggle="collapse" data-target="#collapseAnsweredQuestions" aria-expanded="false" aria-controls="collapseAnsweredQuestions">
Review Answers
</button>
<a class="btn btn-sm btn-outline-success rounded-0" href="#" onclick="(function() {
location.reload();
})(); return false;">Restart</a>
<div class="collapse pt-2" id="collapseAnsweredQuestions">
<ul class="list-group text-left py-sm-2 mt-2 mb-2 question-item-1" data-number="1">
<li class="list-group-item list-group-item-dark text-center question-indexer">Question 1 of 10</li>
<li class="list-group-item question-text">Federal Responsibilities</li>
<li class="list-group-item question-option list-group-item-danger">
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input q-option" type="radio" value="1" name="AA0059">
National Defence, Foreign Policy, education
</label>
</div>
</li>
<li class="list-group-item question-option">
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input q-option" type="radio" value="2" name="AA0059">
Foreign Policy, Citizenship, Social and Community Health
</label>
</div>
</li>
<li class="list-group-item question-option list-group-item-success">
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input q-option" type="radio" value="3" name="AA0059">
National Defence, Foreign Policy, Citizenship
</label>
</div>
</li>
<li class="list-group-item question-option">
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input q-option" type="radio" value="4" name="AA0059">
National Defence, Transportation and Utilities
</label>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="modal" id="noQuestionsAnswered" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">No question(s) answered</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Please answer some questions before submitting.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-sm" data-dismiss="modal">Ok</button>
</div>
</div>
</div>
</div>
</main>
<footer class="footer">
<div class="social-media-share">
<div class="fb-share-button" data-href="http://canadiancitizenshiptest.co.nf/practice.html" data-layout="button" data-size="small" data-mobile-iframe="true"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fcanadiancitizenshiptest.co.nf%2Fpractice.html&src=sdkpreparse" class="fb-xfbml-parse-ignore">Share</a></div>
<div class="g-plus" data-action="share" data-height="15" data-href="http://canadiancitizenshiptest.co.nf/practice.html"></div>
</div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<p>© CCT 2017 - 2018 | Developed by Raymart De Guzman and Leo Sudarma</p>
</footer>
</div>
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/internal/custom-alert.js"></script>
<script src="js/internal/enlarge-image.js"></script>
<script src="js/internal/request.js"></script>
<script src="js/internal/templates.js"></script>
<script src="js/internal/timer.js"></script>
<script src="js/internal/next-prev-button.js"></script>
<script src="js/internal/app.js"></script>
<script src="js/internal/main.js"></script>
<script src="js/back2top.js"></script>
<script>
let disabledFirst = [
$('button[type=submit]'),
$('select[name=number-of-questions]'),
$('input[type=radio][value=true]'),
$('input[type=radio][value=false]')
]
$(window).on('load', function () {
if ($('button[type=submit]').length > 0) {
disabledFirst.forEach((ele) => {
ele.prop('disabled', false)
})
}
})
</script>
<script>
window.addEventListener("beforeunload", function (e) {
let confirmationMessage = "\o/";
e.returnValue = confirmationMessage; // Gecko, Trident, Chrome 34+
return confirmationMessage; // Gecko, WebKit, Chrome <34
});
</script>
</body>
</html>