-
Notifications
You must be signed in to change notification settings - Fork 0
/
exam.php
642 lines (613 loc) · 24.9 KB
/
exam.php
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
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
<?php
session_start();
require_once('includes/dbh.inc.php');
if(!isset($_SESSION['student']) && !isset($_COOKIE['student'])){
header("Location: login.php");
exit();
}
if(!isset($_GET['eid']) || !isset($_GET['sid']) || !isset($_GET['course'])){
header("Location: ../exams.php?error");
exit();
}
$eid = $_GET['eid'];
$sid = $_GET['sid'];
$course = $_GET['course'];
$sql = "select * from results where student_id = $sid and exam_id = '$eid' and submission != 0";
$res = mysqli_query($conn, $sql);
$count = mysqli_num_rows($res);
if($count > 0){
header("Location: exams.php?finished");
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Exam | IAS</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/exam.css">
<link rel="stylesheet" type="text/css" href="css/calc.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="icon" type="image/jpg"
href="images/logo.jpg" />
</head>
<body>
<?php
$sql = "select * from exams where exam_id='$eid'";
$res = mysqli_query($conn, $sql);
$exam = mysqli_fetch_array($res);
$sql = "select * from paper_question where paper_id = '".$exam['paper_id']."'";
$res = mysqli_query($conn, $sql);
$no_of_questions = mysqli_num_rows($res);
//FIRST QUESTION
$sql = "select * from paper_question where paper_id = '".$exam['paper_id']."' and sl_no=1";
$res = mysqli_query($conn, $sql);
$firstq = mysqli_fetch_array($res);
$marks = $firstq['marks'];
if($firstq['question_type'] == 'MCQ' || $firstq['question_type'] == 'MMC'){
$sql = "select * from paper_question inner join mcq on question_id=mcq_id where mcq_id = ".$firstq['question_id']." and paper_id = '".$firstq['paper_id']."'";
$res = mysqli_query($conn, $sql);
$firstq = mysqli_fetch_array($res);
$qtype = $firstq['question_type'];
if($qtype=='MMC'){
$qtype = 'MMCQ';
}
}
else if($firstq['question_type'] == 'NAT') {
$sql = "select * from paper_question inner join nat on question_id=nat_id where nat_id = ".$firstq['question_id']." and paper_id = '".$firstq['paper_id']."'";
$res = mysqli_query($conn, $sql);
$firstq = mysqli_fetch_array($res);
$qtype = $firstq['question_type'];
}
//STUDENT PROFILE
$query = "select * from students INNER JOIN students_courses ON student_id=stu_id INNER JOIN courses ON courses.course_id=students_courses.course_id INNER JOIN centers ON centers.center_id=students_courses.center_id where stu_id=$sid";
$result = mysqli_query($conn, $query);
$student = mysqli_fetch_array($result);
?>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="index.php" class="pull-left hidden-xs"><img src="images/logo.jpg " height="35" width="45" style="margin:8px;"></a>
<a class="navbar-brand" href="index.php"><span class="brand"><span>I</span>NSTITUTE OF <span>A</span>PPLIED <span>S</span>CIENCE</span></a>
</div>
</div>
</nav>
<div class="instructions_wrap">
<span class="pull-left"><?php echo $exam['exam_title'] ?> | </span>
<span class="pull-left"><?php echo $exam['exam_type'] ?> | </span>
<span class="pull-left"><?php echo $exam['exam_standard'] ?></span>
<span class="pull-right"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
Instructions</span>
<span class="pull-left hidden" id="pid"><?php echo $exam['paper_id'] ?></span>
<span class="pull-left hidden" id="sid"><?php echo $sid ?></span>
<span class="pull-left hidden" id="eid"><?php echo $eid ?></span>
<span class="pull-left hidden" id="duration"><?php echo $exam['exam_time'] ?></span>
<span class="pull-left hidden" id="no_of_questions"><?php echo $no_of_questions ?></span>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-10 mainbody instruction" id="instruction">
<p class="ihead">Instructions</p>
<p class="note">Please read the instructions very carefully</p>
<div class="instruction_wrap">
<ol style="list-style-position: inside;">
<li>By clicking on START EXAM button your exam will be started.</li>
<li>You have to click on SAVE AND NEXT or SAVE AND MARK FOR REVIEW button to save your answer for each question.</li>
<li>If answer a question and save it as SAVE AND MARK FOR REVIEW, the answer will be auto-submitted after completion of the exam.</li>
<li>You can jump to any question of the Question Paper using the QUESTION PALATE at the right of the Exam Window.</li>
<li>For NUMERICAL ANSWER TYPE (NAT) questions you have to give answer upto the specified decimal places after point mentioned in the question otherwise your answer will be treated as incorrect. If the information about the decimal places after point is not provided in the question, answer upto 2 decimal places.</li>
<li> For each type of action taken against a question by you the button of the Question Palate will change its colour accordingly.</li>
<li>Time of the exam is maintaining in server and is shown at the top-right corner of your screen. When the clock becomes 0 (zero) the exam will be submitted automatically.</li>
<li> If calculator is allowed for your exam, you must use the VIRTUAL CALCULATOR provided at the top-right corner of your screen. If calculator is not allowed for the exam, it will not be shown.</li>
<li>DO NOT PRESS ANY KEY OF KEYBOARD of your device during the exam. To answer NAT questions use the VIRTUAL KEYPAD provided.</li>
<li>DO NOT OPEN ANY OTHER TAB in your device. System may show you a Warning Messege if you try to reach at the top of your screen.</li>
<li>DO NOT OPEN ANY OTHER APPLICATION OR PROGRAM in your device.</li>
<li>DO NOT MINIMIZE THE EXAM WINDOW during exam.</li>
<li>RIGHT CLICK IS NOT ALLOWED during exam.</li>
<li>EXAM WILL BE AUTO-SUBMITTED IMMIDIETLY for occurance of any one of 8 to 11 of these instructions.</li>
<li>You can Submit your exam at any time during the Exam Period. If you doesn't your exam will be submitted automatically after completion of the Exam Period.</li>
</ol>
</div>
<div class="response_wrap" id="insnext">
<button class="btn btn-primary pull-right" id="startex">Next</button>
</div>
</div>
<div class="col-sm-10 mainbody" id="questionsbody">
<div class="stream_wrap">
<span class="stream"><?php echo $course ?></span>
<?php
if($exam['exam_cal'] == 'Yes')
echo '<i class="fa fa-calculator fa-5 pull-right" aria-hidden="true" id="calc_open"></i>';
?>
</div>
<div class="time_wrap">
<span class="pull-right">
<b>Time Left: <span class="min" id="min">00</span>
<span class="colon">:</span>
<span class="sec" id="sec">00</span></b>
</span>
</div>
<div class="qtype_wrap">
<span class="qtype"><b>Question Type: <span id="qtype"><?php echo $qtype ?></span></b></span>
<span class="marks pull-right">Marks for correct answer: <span style="color:green;" id="marks"><?php echo $marks ?></span></span>
</div>
<div class="question_wrap">
<div class="question_no" ><b>Question <span id="qno">1</span></b></div>
<div class="question_data" id="question_data"></div>
<div class="options" id="response"></div>
</div>
<div class="response_wrap">
<button class="btn btn-default" id="review">Mark for Review & Next</button>
<button class="btn btn-default" id="clear_response">Clear Response</button>
<button class="btn btn-primary pull-right" id="save">Save & Next</button>
</div>
</div>
<div class="col-sm-2 sidebar">
<div class="user">
<img class="img" <?php echo 'src="'.$student['stu_imageLocation'].'"'; ?> height="100" width="100" />
<span><?php echo $student['stu_name']; ?></span>
</div>
<div class="nav_buttons" id="navbtn1" style="border:none; border-left: 1px solid #bdbdbd">
</div>
<div class="nav_buttons" id="navbtn">
<div class="nav_demo">
<div class="row" style="margin: 0;">
<table>
<tr>
<td><span class="answered">1</span>Answered</td>
<td><span class="not_answered">0</span>Not Answered</td>
</tr>
<tr>
<td><span class="not_visited">55</span>Not Visited</td>
<td><span class="review">10</span>Marked for Review</td>
</tr>
<tr>
<td colspan="2"><span class="answered_review">2</span>Answered and Marked for Review (will be considered for evaluation)</td>
</tr>
</table>
</div>
</div>
<div class="exam_name" >
<?php echo $exam['exam_title'] ?>
</div>
<div class="navigation" id = "navigation">
</div>
</div>
<div class="submission" id="subf">
</div>
<div class="submission" id="submission">
<button class="btn btn-primary" id="submit">Submit</button>
</div>
</div>
</div>
</div>
<!-----CALCULATOR--->
<div class="wrapper-main-calc">
<div class="calc-header"><span class="pull-right" id="close_calc" aria-hidden="true">×</span></div>
<div class="col-xs-12 wrapper-calc mt30 ptb30" ng-app="calculator" ng-controller="calculatorController">
<div class="row output">
<div style="border-bottom:dashed 1px #EFEFEF;" class="col-xs-12 mtb15">
<span style="color:#888;">Mode</span>
<span id="output" style="float:right; display:inline-block; text-align:center;">{{mode}}</span>
</div>
<div style="border-bottom:dashed 1px #EFEFEF;" class="col-xs-12 mtb15">
<span style="color:#888;">Output</span>
<span id="output" style="float:right; display:inline-block; text-align:center;">{{result}}</span>
</div>
<div class="col-xs-12 mb30">
<span style="color:#888;">Input Evaluated</span>
<span style="float:right; display:inline-block; text-align:center;" ng-bind-html="formula|unsafe"></span>
</div>
<input my-enter class="col-xs-12" type="text" ng-model="input" placeholder="Enter the expression" id="input" />
</div>
<div id="buttoncontainer" class="row">
<div class="col-xs-12">
<div class="row">
<div class='col-sm-2 col-xs-2 text-center'>
<div class='row plr5 ptb5'>
<input type="radio" name="angle" id="degree" checked class="angle" style="display:none;">
<label for="degree" ng-click="changeAngle(true)" class="button anglelabel" style="padding:0;margin:0;">Degree</label>
</div>
</div>
<div class='col-sm-2 col-xs-2 text-center'>
<div class='row plr5 ptb5'>
<input type="radio" name="angle" class="angle" id="radian" style="display:none;">
<label for="radian" ng-click="changeAngle(false)" class="button anglelabel" style="padding:0;margin:0;">Radian</label>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='' ng-click='changeState($event)' class='button'>MS</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='' ng-click='changeState($event)' class='button'>MC</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='a.mem' ng-click='changeState($event)' class='button'>MR</button>
</div>
</div>
<div class='col-sm-1 col-xs-1'>
<div class='row plr5 ptb5'>
<button id='' ng-click='changeState($event)' class='button'>M+</button>
</div>
</div>
<div class='col-sm-1 col-xs-1'>
<div class='row plr5 ptb5'>
<button id='' ng-click='changeState($event)' class='button'>M-</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='sin(' ng-click='changeState($event)' class='button'>sin</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='cos(' ng-click='changeState($event)' class='button'>cos</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='tan(' ng-click='changeState($event)' class='button'>tan</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='pi' ng-click='changeState($event)' class='button'>π</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='' ng-click='changeState($event)' class='button'>BKSPC</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='' ng-click='changeState($event)' class='button'>C</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='asin(' ng-click='changeState($event)' class='button'>sin<sup>-1</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='acos(' ng-click='changeState($event)' class='button'>cos<sup>-1</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='atan(' ng-click='changeState($event)' class='button'>tan<sup>-1</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='1' ng-click='changeState($event)' class='button'>1</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='2' ng-click='changeState($event)' class='button'>2</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='3' ng-click='changeState($event)' class='button'>3</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='e' ng-click='changeState($event)' class='button'>e</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='(' ng-click='changeState($event)' class='button'>(</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id=')' ng-click='changeState($event)' class='button'>)</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='4' ng-click='changeState($event)' class='button'>4</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='5' ng-click='changeState($event)' class='button'>5</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='6' ng-click='changeState($event)' class='button'>6</button>
<!---->
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='^(2)' ng-click='changeState($event)' class='button'>x<sup>2</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='^(3)' ng-click='changeState($event)' class='button'>x<sup>3</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='^' ng-click='changeState($event)' class='button'>x<sup>y</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='7' ng-click='changeState($event)' class='button'>7</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='8' ng-click='changeState($event)' class='button '>8</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='9' ng-click='changeState($event)' class='button'>9</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='^(1/2)' ng-click='changeState($event)' class='button'>√</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='^(1/3)' ng-click='changeState($event)' class='button'><sup>3</sup>√x</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='^1/' ng-click='changeState($event)' class='button'><sup>y</sup>√x</button>
</div>
</div>
<div class='col-sm-1 col-xs-1'>
<div class='row plr5 ptb5'>
<button id='-' ng-click='changeState($event)' class='button'>±</button>
</div>
</div>
<div class='col-sm-1 col-xs-1'>
<div class='row plr5 ptb5'>
<button id='.' ng-click='changeState($event)' class='button'>.</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='0' ng-click='changeState($event)' class='button num'>0</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='=' ng-click='changeState($event)' class='button'>=</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='sinh(' ng-click='changeState($event)' class='button'>sinh</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='cosh(' ng-click='changeState($event)' class='button'>cosh</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='tanh(' ng-click='changeState($event)' class='button'>tanh</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='+' ng-click='changeState($event)' class='button'>+</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='-' ng-click='changeState($event)' class='button'>-</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='*' ng-click='changeState($event)' class='button'>*</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='asinh(' ng-click='changeState($event)' class='button'>sinh<sup>-1</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='acosh(' ng-click='changeState($event)' class='button'>cosh<sup>-1</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='atanh(' ng-click='changeState($event)' class='button'>tanh<sup>-1</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='/' ng-click='changeState($event)' class='button'>/</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='perc' class='button'>%</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id=' Mod ' ng-click='changeState($event)' class='button'>Mod</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id=' log(' ng-click='changeState($event)' class='button'>log</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='logxBasey' ng-click='changeState($event)' class='button'>log<sub>y</sub>x</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id=' ln(' ng-click='changeState($event)' class='button'>ln</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='!' ng-click='changeState($event)' class='button'>n!</button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id=' 10^(' ng-click='changeState($event)' class='button'>10<sup>x</sup></button>
</div>
</div>
<div class='col-sm-2 col-xs-2'>
<div class='row plr5 ptb5'>
<button id='1/' ng-click='changeState($event)' class='button'>1/x</button>
</div>
</div>
</div><br>
<center><span><b>Please Note:</b> Calculate log<sub>y</sub>x separately from any expression.</span></center>
</div>
</div>
<div id="ajaxwindow2">
</div>
</div>
</div>
</div>
<div id="success-modal">
<div class="modalcontent">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
<h4 class="snap">WARNING!</h4>
<p class="msg">You tried to leave the tab, authorities will be notified.</p>
<button id="close_submit" class="btn btn-danger">Close</button>
</div>
</div>
<div id="left-tab">
<div class="modalcontent">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
<h4 class="snap">EXAM SUBMITTED!</h4>
<p class="msg">You left the tab. Your exam has been submitted. Authorities will be notified.</p>
<div class="row stats">
<div class="col-sm-4">
<p>Answered: <span class="anum"></span></p>
</div>
<div class="col-sm-4">
<p>Marked For Review: <span class="revnum"></span></p>
</div>
<div class="col-sm-4">
<p>Not Attempted: <span class="notanum"></span></p>
</div>
</div>
<button id="close_submit2" onclick="window.top.close();" class="btn btn-danger">Close</button>
</div>
</div>
<div id="finish">
<div class="modalcontent">
<i class="fa fa-check" aria-hidden="true"></i>
<h4 class="snap">Exam Submitted!</h4>
<p class="msg">Your exam has been submitted successfully.</p>
<div class="row stats">
<div class="col-sm-4">
<p>Answered: <span class="anum"></span></p>
</div>
<div class="col-sm-4">
<p>Marked For Review: <span class="revnum"></span></p>
</div>
<div class="col-sm-4">
<p>Not Attempted: <span class="notanum"></span></p>
</div>
</div>
<button id="close_submit2" onclick="window.top.close();" class="btn btn-danger">Close</button>
</div>
</div>
<div id="ended">
<div class="modalcontent">
<i class="fa fa-clock-o" aria-hidden="true"></i>
<h4 class="snap">TIMEOUT!</h4>
<p class="msg">Exam submitted.</p>
<div class="row stats">
<div class="col-sm-4">
<p>Answered: <span class="anum"></span></p>
</div>
<div class="col-sm-4">
<p>Marked For Review: <span class="revnum"></span></p>
</div>
<div class="col-sm-4">
<p>Not Attempted: <span class="notanum"></span></p>
</div>
</div>
<button id="close_submit1" class="btn btn-danger">Close</button>
</div>
</div>
<footer>Version: 00.01</footer>
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/exam.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
<script type="text/javascript" src="js/calc.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript">
$('#perc').click(function (){
var data = $('#input').val();
var i = data.length-1;
var num = '';
while(!isNaN(data[i]) || data[i]=='.'){
num += data[i];
i--;
}
num = num.split( '' ).reverse( ).join( '' );
num = parseFloat(num);
num = num / 100;
data = data.substr(0,i+1);
if(isNaN(num)){
alert('Cannot use % here. Hint: try evaluating the inner expression first.');
$('#input').val(data);
}
else{
$('#input').val(data + num);
}
});
$('#close_calc').click(function() {
$('.wrapper-main-calc').hide();
});
$('#calc_open').click(function() {
$('.wrapper-main-calc').show();
});
</script>
<script>
/*$(document).bind("contextmenu",function(e) {
e.preventDefault();
});
$(document).keydown(function(e){
return false;
});*/
</script>
</body>