-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiztaking.php
More file actions
549 lines (499 loc) · 28.4 KB
/
quiztaking.php
File metadata and controls
549 lines (499 loc) · 28.4 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
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
<!--Check if user is logged in-->
<?php
session_start();
if (!isset($_SESSION["username"])) {
header("Location: login.php");
exit();
}
if (!isset($_GET["quizcode"])) {
header("Location: quizfetching.php");
exit();
}
include_once("./src/checkmaintenancestatus.php");
include_once("./src/dbconnect.php");
/* check if quiz exists, then prepare quiz details */
$sql = $conn->prepare("SELECT * FROM quizzes WHERE access_code = ?");
$sql->bind_param("s", ($_GET['quizcode']));
$sql->execute();
$result = $sql->get_result();
if ($result->num_rows == 0) {
$_SESSION["quizfetchfailed"] = 1;
header("Location: quizfetching.php");
exit();
} else {
while ($row = $result->fetch_assoc()) {
if ($row['is_public'] == 0 && $row['from_user_id'] != $_SESSION['userid']) {
//quiz exists but not set to public
$_SESSION["quizfetchfailed"] = 2;
header("Location: quizfetching.php");
exit();
} else {
unset($_SESSION["quizfetchfailed"]);
$quizid = $row['quiz_id'];
$quiztitle = $row['quiz_title'];
$quizdesc = nl2br($row['quiz_desc']);
$timelimit = $row['time_limit'];
$attemptlimit = $row['attempt_limit'];
$isbacktrack = $row['is_allowbacktrack'];
$isshufflequestionorder = $row['is_shufflequestionorder'];
$isexammode = $row['is_exammode'];
$isviewquestions = $row['is_viewquestions'];
$isshowcorrectanswers = $row['is_showcorrectanswers'];
$hasessay = $row['has_essay'];
}
}
}
/* get number of questions and points*/
$sql = $conn->prepare("SELECT COUNT(question_id),SUM(points) FROM questions WHERE from_quiz_id = ?");
$sql->bind_param("s", $quizid);
$sql->execute();
$result = $sql->get_result();
$row = $result->fetch_assoc();
$numquestions = $row['COUNT(question_id)'];
$numpoints = $row['SUM(points)'];
/* get attempts used by user*/
$sql = $conn->prepare("SELECT COUNT(result_id) FROM results WHERE from_quiz_id = ? AND from_user_id = ?");
$sql->bind_param("ss", $quizid, $_SESSION['userid']);
$sql->execute();
$result = $sql->get_result();
while ($row = $result->fetch_assoc()) {
$attemptsused = $row['COUNT(result_id)'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<link href="css/elegant-icons-style.css" rel="stylesheet" />
<link href="css/font-awesome.min.css" rel="stylesheet" />
<link href="css/jquery-jvectormap-1.2.2.css" rel="stylesheet">
<link rel="stylesheet" href="css/fullcalendar.css">
<link href="css/widgets.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/style-responsive.css" rel="stylesheet" />
<link href="css/xcharts.min.css" rel=" stylesheet">
<link href="css/jquery-ui-1.10.4.min.css" rel="stylesheet">
<link href="css/helptip.css" rel="stylesheet">
<link rel="icon" href="favicon.ico">
<meta name="description" content="ANYQUIZ is a fully featured quiz maker for school, business, or just for fun. Create one now and explore its awesome features that match your desire and purpose.">
<meta name="author" content="Wayne Dayata">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- javascripts -->
<script src="js/jquery.js"></script>
<script src="js/jquery-ui-1.10.4.min.js"></script>
<script src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.9.2.custom.min.js"></script>
<!-- bootstrap -->
<script src="js/bootstrap.min.js"></script>
<!--custome script for all page-->
<script src="js/scripts.js"></script>
<!-- nice scroll -->
<script src="js/jquery.nicescroll.js" type="text/javascript"></script>
<script type="text/javascript" src="./src/unifiedpopups.js"></script>
<script type="text/javascript" src="./src/auth.js"></script>
<link href="css/offline-theme-chrome2.css" rel="stylesheet">
<link href="css/offline-language-english.min.css" rel="stylesheet">
<script src="js/offline.min.js" type="text/javascript"></script>
<style>
.link {
cursor: pointer;
}
@media (min-width:1100px) {
.warningcont {
margin-left: 87px;
}
}
.code {
font-family:monospace;
font-size:14px;
}
</style>
<!--For MathJax expressions-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script>
<style>
.mjx-chtml,.MJXc-display{
display:inline-block !important;
margin:4px 1px !important;
}
</style>
<script>
var numquestions = <?php echo $numquestions ?>;
var isexammode = <?php echo $isexammode ?>;
var isbacktrack = <?php echo $isbacktrack ?>;
var timelimit = <?php echo $timelimit ?>;
var isshufflequestionorder = <?php echo $isshufflequestionorder ?>;
var isviewquestions = <?php echo $isviewquestions ?>;
var isshowcorrectanswers = <?php echo $isshowcorrectanswers ?>;
var hasessay = <?php echo $hasessay ?>;
var quizid = <?php echo $quizid; ?>;
var isvalidattempt = <?php echo ($attemptlimit > 0 && $attemptsused >= $attemptlimit) ? 0 : 1; ?>;
var perfectscore = <?php echo $numpoints ?>;
$(document).ready(function() {
$('html').getNiceScroll().remove();
$('html').css({
"overflow-x": "hidden"
});
$(window).keydown(function(event) {
if (event.keyCode == 13) {
if (isbacktrack != 2 && $(".questiontype:eq(" + visibleDiv + ")").html() != "ESSAY") {
event.preventDefault();
return false;
}
}
});
MathJax.Hub.Config({
skipStartupTypeset: true,
extensions: ["tex2jax.js", "TeX/AMSmath.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [
["$$", "$$"]
],
processEscapes: true
}
});
});
</script>
<script type="text/javascript" src="./src/quiztaking.js"></script>
<title>
<?php echo $quiztitle; ?> | ANYQUIZ
</title>
</head>
<body onload="checkexammode()">
<section id="container" class="">
<header class="header white-bg" style="z-index:5;">
<div class="toggle-nav">
<div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"><i class="icon_menu"></i></div>
</div>
<!--logo start-->
<a class="logo link" onclick="checkbeforeredirect('index.php')"><b>ANY <span class="lite">QUIZ</span></b></a>
<!--logo end-->
<!-- quiz timer -->
<div style="position:fixed; top:8px; width:100%;">
<div id="timeralert" class="alert" role="alert" style="padding:9px !important; width:260px; margin:auto; font-size:18px; color:#202326; background-color:#e2e3e5;border-color:grey; border-radius:6px; text-align:center; display:none; z-index:6;">
<i class="icon_clock"></i>
<span id="timercomment"></span>
<b id="timer"></b>
</div>
</div>
<div class="top-nav notification-row">
<!-- notificatoin dropdown start-->
<ul class="nav pull-right top-menu">
<!-- user login dropdown start-->
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<span class="profile-ava">
<img alt="" src="img/id-pic1.png">
</span>
<!-- User name-->
<span class="username">
<?php echo $_SESSION['username']; ?>
</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu extended logout">
<div class="log-arrow-up"></div>
<li class="eborder-top">
<a onclick="checkbeforeredirect('profile.php')"><i class="icon_profile link"></i> My Profile</a>
</li>
<li>
<a onclick="checksignout(event)" style="cursor:pointer;"><i class="icon_key_alt"></i> Log Out</a>
</li>
</ul>
</li>
<!-- user login dropdown end -->
</ul>
<!-- notificatoin dropdown end-->
</div>
</header>
<!--header end-->
<!--sidebar start-->
<aside>
<div id="sidebar" class="nav-collapse " style="z-index:4;">
<!-- sidebar menu start-->
<ul class="sidebar-menu">
<li class="sub-menu">
<a onclick="checkbeforeredirect('index.php')" class="link">
<i class="icon_house"></i>
<span>Dashboard</span>
</a>
</li>
<li class="sub-menu">
<a onclick="checkbeforeredirect('quiz.php')" class="link">
<i class="icon_document"></i>
<span>My Quizzes</span>
</a>
</li>
<li class="sub-menu mobile">
<a onclick="checkbeforeredirect('quiz_maker.php')" class="link">
<i class="fa fa-plus"></i>
<span>Create a Quiz</span>
</a>
</li>
<li class="active">
<a onclick="checkbeforeredirect('quizfetching.php')" class="link">
<i class="icon_pencil_alt"></i>
<span>Take a Quiz</span>
</a>
</li>
<li class="sub-menu mobile">
<a onclick="checkbeforeredirect('profile.php')" class="link">
<i class="icon_profile"></i>
<span>My Profile</span>
</a>
</li>
<li class="sub-menu">
<a onclick="checkbeforeredirect('about.php')" class="link">
<i class="icon_info"></i>
<span>About</span>
</a>
</li>
<li class="sub-menu mobile">
<a onclick="signoutClick(event)" style="cursor:pointer;">
<i class="icon_key"></i>
<span>Log Out</span>
</a>
</li>
</ul>
<!-- sidebar menu end-->
</div>
</aside>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<!--overview start-->
<div class="row">
<div class="col-lg-9">
<h3 class="quizTitle" style="margin: 20px; padding-bottom: 10px; font-weight:bold;">
<?php echo $quiztitle; ?>
</h3>
</div>
</div>
<form id="quiz" method="POST" onsubmit="checkQuiz(event)" autocomplete="off">
<!-- quiz settings tab -->
<div class="row maintab">
<div class="count-4" style="padding-left: 50px; font-size: 20px; font-weight:bold;">
Points: <span id="numpoints" style="color:blue"><?php echo $numpoints ?></span>
Questions: <span id="numquestions" style="color:blue"><?php echo $numquestions ?></span>
Time Limit:
<span style="color:blue">
<?php
if ($timelimit < 0) {
echo "None";
} else if ($timelimit < 60) {
echo $timelimit . " mins";
} else if ($timelimit >= 60) {
echo (intval($timelimit / 60)) . " hour";
if ($timelimit >= 120) {
echo "s";
}
if ($timelimit % 60 != 0) {
echo ", " . ($timelimit % 60) . " mins";
}
}
?>
</span>
Attempts made:
<span style="color:<?php echo ($attemptlimit > 0 && $attemptsused >= $attemptlimit) ? "red" : "blue"; ?>">
<?php
echo $attemptsused;
if ($attemptlimit > 0) {
echo " / " . $attemptlimit;
}
?>
</span>
</div>
<div class="count-5" style="padding-left: 50px; padding-top:20px; font-size: 17px;"><b>Instruction:</b><br>
<div style="padding-left:25px; padding-right:20%">
<?php echo $quizdesc; ?>
</div>
</div>
<div class="count-6" style="padding-top: 25px; padding-left: 50px; font-size: 14px;">
<?php
if ($isexammode || !$isbacktrack) {
if ($isexammode == 1) {
echo "<div class='alert alert-warning' role='alert' style='margin-right:25%; border-radius:12px;'><i class='icon_error-triangle'></i> <b>You must <u>stay within this page only</u> for the entire duration of the quiz. You will not be allowed to continue once a focus change is detected and an invalid attempt will be recorded.</b></div>";
}
if ($isexammode == 2) {
echo "<div class='alert alert-warning' role='alert' style='margin-right:25%; border-radius:12px;'><i class='icon_error-triangle'></i> <b>You must <u>enable fullscreen mode</u> and <u>stay within this page only</u> during the quiz. You will not be allowed to continue once an attempt to exit full screen or a focus change is detected, and an invalid attempt will be recorded. <br><a style='cursor:pointer;' onclick='togglefullscreen()'>Click here to enable fullscreen mode and begin quiz button.</a></b></div>";
}
if (!$isbacktrack) {
echo "<div class='alert alert-warning' role='alert' style='margin-right:25%; border-radius:12px;'><i class='icon_error-triangle'></i> <b><u>Backtracking is disabled in this quiz</u>: Once you submit an answer, you won't be able to go back to the previous questions and change your responses.</b></div>";
}
}
if ($attemptlimit > 0 && $attemptsused >= $attemptlimit) {
echo "<div class='alert alert-danger' role='alert' style='margin-right:25%; border-radius:12px;'><i class='icon_close_alt'></i> <b>Warning! You have used all your attempts given for this quiz. <br><span class='warningcont'>You may still proceed to take the quiz; however, <u>your answers and results will no longer be recorded</u></b>.</span></div>";
}
?>
</div>
<!-- embed serialized values for transmission to database -->
<div class="count" style="margin-right:20%;">
<button id="takethequiz" type="button" class="btn btn-info" style=" display:block; margin:auto; text-align:center; width: 200px; height: 40px; border: 1px solid white; right: 150px;
font-size: 15px;" onclick="sendtoken(event)" disabled>
<b>Take the Quiz</b>
</button>
</div>
<a href="index.php"><button type="button" class="btn btn-info" style="margin-left:40px;"><b>Back to Home</b></button></a>
<!-- end of quiz settings tab-->
</div>
<!-- questions tab -->
<div class="row maintab" id="questionlist" style="display:none;">
<!-- question groups tab - each question will be added and set via PHP/MySQL -->
<div class="questions">
<!-- question fetching transferred to another PHP page - a security update -->
<!-- end of question groups tab-->
</div>
<br><br>
<div id="questionbuttons" class="row" style="padding-left: 60px; width:75%; display:none;">
Go to question:
<?php
for ($i = 1; $i <= $numquestions; $i++) {
echo <<<EOT
<button type="button" class="questionnumbutton" style="background-color:dodgerblue; color: white; margin-bottom:10px; border-radius:5px;" onclick="showquestion($i)">$i</button>
EOT;
}
?>
</div>
<br>
<div class="row" style="padding-left: 60px;">
<div style="float:left;">
<button type="button" id="prevquestion" class="btn btn-info" style="display:none;" onclick="showPrev()"><b>Previous</b></button>
<button type="button" id="nextquestion" class="btn btn-info" style="display:none;" onclick="showNext()"><b>Next</b></button>
</div>
<div style="float:right; margin-right:25%">
<input type="hidden" name="attempttime" value="0">
<input type="hidden" name="totalscore" value="0">
<input type="hidden" name="perfectscore" value="0">
<input type="hidden" name="isfinal" value="1">
<button id="finishquiz" type="submit" class="btn btn-success"><b>Finish Quiz</b></button>
<button id="viewresults" type="button" class="btn btn-success" onclick="showtab(1,2)" style="display:none;"><b>View Results</b></button>
</div>
</div>
<!-- end of questions tab-->
<br>
</div>
</form>
<!-- end screen tab -->
<div class="row maintab" style="display:none;">
<div class="row">
<div class="count" style="padding-left:50px;"> Score: <span id="totalscore" style="color:blue;"></span></div>
</div>
<div class="row">
<div class="count" style="padding-left:50px;"> Attempt time: <span id="attempttime" style="color:blue;"></span></div>
</div>
<div class="row">
<div class="count" style="padding-left:50px;"> Questions answered: <span id="questionsanswered" style="color:blue;"></span></div>
</div>
<div class="row">
<?php
if ($isviewquestions == 0) {
echo <<<EOT
<div class='alert alert-warning' role='alert' style='width:550px; margin-left:50px;'><i class='icon_error-circle'></i> <b>Viewing of questions after submission is disabled for this quiz.</b></div>
EOT;
}
if ($isviewquestions == 1 && $isshowcorrectanswers == 0) {
echo <<<EOT
<div class='alert alert-warning' role='alert' style='width:550px; margin-left:50px;'><i class='icon_error-circle'></i> <b>Correct answers are hidden.</b></div>
EOT;
}
if ($attemptlimit > 0) {
if ($attemptsused >= $attemptlimit) {
echo <<<EOT
<div class='alert alert-danger' role='alert' style='width:550px; margin-left:50px;'><i class='icon_close_alt'></i> <b>You have exceeded the attempt limit for this quiz. Your answers and results for this attempt and the succeeding attempts on this quiz <u>will not be recorded</u>.</b></div>
EOT;
} else if ($attemptsused + 1 >= $attemptlimit) {
echo <<<EOT
<div class='alert alert-warning' role='alert' style='width:550px; margin-left:50px;'><i class='icon_error-circle'></i> <b>You have used your final attempt for this quiz. You may still opt to take this quiz again; however, your answers and results for the succeeding attempts on this quiz <u>will no longer be recorded</u>.</b></div>
EOT;
}
}
echo <<<EOT
<div id="essaywarning" class='alert alert-info' role='alert' style='display:none; width:550px; margin-left:50px;'><i class='icon_error-circle'></i> <b>Some items are not yet checked.</b></div>
EOT;
?>
</div>
<div class="row">
<div class="count-10" style="font-size: 16px; padding-left: 60px; font-weight: 700px;">
<?php echo ($attemptlimit > 0 && $attemptsused >= $attemptlimit) ? "" : "Your quiz results have been recorded.<br>"; ?>
<?php echo ($isviewquestions == 0) ? "" : "Click the View Questions button below to review your quiz attempt.<br>"; ?>
When finished, click Back to Home button to return to the home page.<br><br>
</div>
</div>
<div class="row" style="padding-left: 60px; font-size:18px;">
<div style="float:left;">
<button type="button" id="viewquestions" class="btn btn-success" onclick="showtab(2,1)"><b>View Questions</b></button>
</div>
<div style="float:right; margin-right:25%">
<a href="index.php"><button type="button" class="btn btn-success"><b>Back to Home</b></button></a>
</div>
</div>
<!-- end of end screen tab -->
</div>
</section>
<div style="height:50px">
</div>
</section>
</section>
<!-- pop up alert when attempting to click other links during a quiz attempt -->
<div style="position:fixed; top:80px; padding-left:42px; width:100%">
<div id="popuperror" class="alert alert-danger" style="border-radius:6px; width:440px; margin:auto; display:none; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
<i class='icon_error-circle'></i> Navigation to other pages is disabled while a quiz is ongoing.
</div>
<div id="popupalert" class="alert alert-danger" style="border-radius:6px; width:440px; margin:auto; display:none; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
<i class='icon_error-circle'></i> <span id="alertcontent"></span>
</div>
<div id="popupsuccess" class="alert alert-info" style="border-radius:6px; width:245px; margin:auto; display:none; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
<i class='icon_info'></i> <span id="successcontent"></span>
</div>
</div>
<!-- modals to display in replacement of JS alert messages which caused infinite loop issue-->
<div id="changetaberror" class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-header">
<h4 class="modal-title" id="exampleModalLongTitle" style="color:maroon; font-weight:bold"><i class="icon_error-circle"></i> Invalid attempt - Focus change detected</h4>
</div>
<div class="modal-content" style="padding:15px 20px; box-shadow:none; -webkit-box-shadow:none;">
<b>You have navigated away from the quiz taking page, thus you are not allowed to continue the quiz and an invalid attempt will be recorded.
Click OK to continue.</b>
</div>
<div class="modal-footer" style="margin:0">
<button type="button" class="btn btn-primary" data-dismiss="modal"><b>OK</b></button>
</div>
</div>
</div>
<div id="fullscreenerror" class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-header">
<h4 class="modal-title" id="exampleModalLongTitle" style="color:maroon; font-weight:bold"><i class="icon_error-circle"></i> Invalid attempt - Exit full screen detected</h4>
</div>
<div class="modal-content" style="padding:15px 20px; box-shadow:none; -webkit-box-shadow:none;">
<b>You have exited full screen which is not allowed while the quiz session is still ongoing, thus you are not allowed to continue the quiz and an invalid attempt will be recorded.
Click OK to continue.</b>
</div>
<div class="modal-footer" style="margin:0">
<button type="button" class="btn btn-primary" data-dismiss="modal"><b>OK</b></button>
</div>
</div>
</div>
<div id="outoftimeerror" class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-header">
<h4 class="modal-title" id="exampleModalLongTitle" style="color:#34aadc; font-weight:bold"><i class="icon_error-circle"></i> Time is up!</h4>
</div>
<div class="modal-content" style="padding:15px 20px; box-shadow:none; -webkit-box-shadow:none;">
<b>You have used up the time alloted for your quiz. Your answers are now being submitted. Click OK to continue.</b>
</div>
<div class="modal-footer" style="margin:0">
<button type="button" class="btn btn-primary" data-dismiss="modal"><b>OK</b></button>
</div>
</div>
</div>
</body>
</html>