-
Notifications
You must be signed in to change notification settings - Fork 0
/
quizes.html
215 lines (207 loc) · 5.62 KB
/
quizes.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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
/>
<!-- Google Material Icons -->
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<!-- Custom Style Sheet -->
<link rel="stylesheet" href="/stylesheet/styler.css" />
<title>Quiz App!</title>
<link rel="icon" type="image/png" href="brain/img/fav.png" />
</head>
<body onload="chkUser()">
<div class="container box-shadow">
<!-- The Form -->
<div id="username">
<form class="form" onsubmit="return false;">
<i class="material-icons">face</i>
<h2>What's Your Name?</h2>
<div class="form-group mx-sm-3 mb-3 passBox">
<label for="pass" class="sr-only"> Name</label>
<input
type="text"
class="form-control"
id="uname"
placeholder=" Name"
onfocus="this.style.borderColor = '#007bff'"
onblur="this.style.borderColor = '#ced4da'"
/>
</div>
<button
type="submit"
class="btn btn-primary mb-2"
onclick="askPass();"
>
Proceed...
</button>
</form>
</div>
<!-- The Form -->
<div id="theForm">
<form class="form" onsubmit="return false;">
<i class="material-icons finger-print">https</i>
<i class="material-icons warning">warning</i>
<i class="material-icons success">done_all</i>
<h2
id="errH"
style="font-weight:bold;font-size:1.7em;margin-bottom: 30px;"
></h2>
<h2 id="err"></h2>
<div class="form-group mx-sm-3 mb-3 passBox">
<label for="pass" class="sr-only">Password</label>
<input
type="password"
class="form-control animated"
id="pass"
placeholder="Provided Key"
onkeyup="typing();"
onfocus="resetErr();"
onblur="this.style.borderColor = '#ced4da';"
/>
</div>
<button
type="submit"
disabled="disabled"
class="btn btn-primary mb-2"
id="submit"
onclick="chkPass(this);"
>
Confirm Identity
</button>
</form>
</div>
<!-- Quiz Starts Here -->
<section id="theQuiz">
<form id="quizForm" onsubmit="return false;">
<h2>General Awareness Test</h2>
<div id="steps" style="text-align:center;">
<!-- Steps will be shown as per questions length -->
</div>
<hr />
<!-- One "tab" for each step in the form: -->
<div id="tab">
<p id="que">---Question---</p>
<hr />
<div class="custom-control custom-radio">
<input
type="radio"
id="opt1"
name="q"
class="custom-control-input"
onclick="enableBtn(this)"
value="1"
/>
<label
class="custom-control-label"
onclick="var id = this.previousElementSibling.id; this.setAttribute('for', id)"
>---Option 1---</label
>
</div>
<div class="custom-control custom-radio">
<input
type="radio"
id="opt2"
name="q"
class="custom-control-input"
onclick="enableBtn(this)"
value="2"
/>
<label
class="custom-control-label"
onclick="var id = this.previousElementSibling.id; this.setAttribute('for', id)"
>---Option 2---</label
>
</div>
<div class="custom-control custom-radio">
<input
type="radio"
id="opt3"
name="q"
class="custom-control-input"
onclick="enableBtn(this)"
value="3"
/>
<label
class="custom-control-label"
onclick="var id = this.previousElementSibling.id; this.setAttribute('for', id)"
>---Option 3---</label
>
</div>
<div class="custom-control custom-radio">
<input
type="radio"
id="opt4"
name="q"
class="custom-control-input"
onclick="enableBtn(this)"
value="4"
/>
<label
class="custom-control-label"
onclick="var id = this.previousElementSibling.id; this.setAttribute('for', id)"
>---Option 4---</label
>
</div>
</div>
<div style="overflow:auto;">
<div style="float:right;">
<button
type="button"
disabled="disabled"
class="btn btn-info mb-2"
id="next-button"
onclick="next();"
>
Next
</button>
</div>
</div>
</form>
</section>
<!-- The Result -->
<section id="theResult">
<div id="resultCircle">
Calculating Your Result...
</div>
<!-- Result Circle End -->
<br />
<!-- <h1>Congrats! Your Are Passed</h1> -->
<h2 id="resultFb" style="font-weight: bold;"></h2>
<h3 id="correctAns"></h3>
<hr />
<button class="btn btn-info" onclick="retakeQuiz();">
Retake Quiz
</button>
</section>
</div>
<!-- Container End -->
<button
class="btn btn-danger"
style="position:absolute; bottom:5px; right:5px;"
onclick="logout();"
id="logoutBtn"
>
Logout
</button>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="/javascript/questions.js"></script>
<script src="/javascript/script.js"></script>
</body>
</html>