-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlearnerdecisiontree.html
More file actions
411 lines (405 loc) · 16.5 KB
/
learnerdecisiontree.html
File metadata and controls
411 lines (405 loc) · 16.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Learning Style Assistance Quiz for Teachers</title>
<link href="https://fonts.googleapis.com/css?family=Poppins:400,600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Poppins', Arial, sans-serif;
background: linear-gradient(135deg, #1e3c72, #2a5298 80%);
color: #f4f7fa;
padding: 2rem;
max-width: 900px;
margin: auto;
min-height: 100vh;
}
nav {
position: sticky;
top: 1rem;
display: flex;
gap: 1rem;
background: rgba(44, 62, 80, 0.90);
border-radius: 12px;
padding: 0.5rem 1rem;
z-index: 100;
margin-bottom: 2rem;
box-shadow: 0 2px 8px rgba(30,60,114,0.06);
}
nav a {
text-decoration: none;
color: #43cea2;
font-weight: 600;
padding: 0.3rem 0.8rem;
border-radius: 5px;
transition: background 0.2s, color 0.2s;
}
nav a:hover {
background: #185a9d;
color: #fff;
}
h1 {
text-align: center;
color: #43cea2;
margin-top: 1.5rem;
margin-bottom: 2rem;
font-size: 2.2rem;
font-weight: 600;
letter-spacing: 1px;
}
.progress-bar {
width: 100%;
background: #232526;
border-radius: 8px;
overflow: hidden;
margin-bottom: 2rem;
height: 12px;
box-shadow: 0 1px 4px rgba(67,206,162,0.10);
}
.progress {
height: 100%;
background: linear-gradient(90deg, #43cea2, #185a9d);
transition: width 0.3s;
width: 0;
}
.question {
margin-bottom: 1.5rem;
background: #232526cc;
padding: 1.2rem 1rem;
border-radius: 14px;
box-shadow: 0 2px 12px rgba(67,206,162,0.10);
transition: box-shadow 0.2s;
}
.question:focus-within {
box-shadow: 0 4px 16px rgba(67,206,162,0.25);
outline: 2px solid #43cea2;
}
.question h3 {
margin-bottom: 0.5rem;
font-size: 1.15rem;
color: #43cea2;
}
label {
display: block;
margin-bottom: 0.3rem;
padding: 0.25rem 0.5rem;
border-radius: 6px;
cursor: pointer;
transition: background 0.2s;
}
input[type="radio"]:focus + label,
label:active {
background: #185a9d33;
}
input[type="radio"] {
margin-right: 0.7em;
accent-color: #43cea2;
}
button[type="button"], .modal button {
display: block;
margin: 2rem auto 0 auto;
padding: 0.9rem 2rem;
font-size: 1.1rem;
background: linear-gradient(90deg, #43cea2, #185a9d);
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
font-weight: 600;
box-shadow: 0 2px 10px rgba(30,60,114,0.08);
transition: background 0.3s, color 0.2s;
}
button[type="button"]:hover, .modal button:hover {
background: linear-gradient(90deg, #185a9d, #43cea2);
color: #fff;
}
.modal-overlay {
display: none;
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.7);
z-index: 999;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.4s;
}
.modal-overlay.active {
display: flex;
opacity: 1;
}
.modal {
background: #2d3136;
color: #43cea2;
border-radius: 16px;
padding: 2rem 2.5rem;
box-shadow: 0 8px 32px rgba(0,0,0,0.3);
text-align: center;
min-width: 300px;
font-size: 1.1rem;
animation: popin 0.45s cubic-bezier(.24,.88,.57,1.18);
position: relative;
max-width: 90vw;
outline: none;
}
.modal button {
margin: 2rem auto 0 auto;
background: #43cea2;
color: #232526;
font-weight: bold;
padding: 0.7rem 1.6rem;
border-radius: 7px;
font-size: 1rem;
border: none;
cursor: pointer;
transition: background 0.2s;
}
.modal button:hover {
background: #185a9d;
color: #fff;
}
.modal .close-x {
position: absolute;
top: 1rem; right: 1.2rem;
font-size: 1.7rem;
color: #aaa;
cursor: pointer;
transition: color 0.2s;
background: none;
border: none;
}
.modal .close-x:hover {
color: #43cea2;
}
ul {
margin: 1em 0 0.5em 0;
padding-left: 1.5em;
text-align: left;
}
@keyframes popin {
from { transform: scale(0.7); opacity: 0;}
to { transform: scale(1); opacity: 1;}
}
@media (max-width: 600px) {
body { padding: 0.5rem; }
h1 { margin-top: 2.5rem; font-size: 1.2rem;}
.modal { padding: 1rem; font-size: 1em;}
nav { flex-direction: column; gap: 0.5rem; }
}
</style>
</head>
<body>
<nav>
<a href="dashboard.html">Dashboard</a>
<a href="learner-style.html">Learner Profile</a>
<a href="learnerdecisiontree.html">Decision Tree</a>
</nav>
<h1>Teacher VAK Learning Style Quiz</h1>
<div class="progress-bar">
<div class="progress" id="progressBar"></div>
</div>
<form id="quizForm">
<div class="question" tabindex="0">
<h3>1. When introduced to new content, the learner...</h3>
<label><input type="radio" name="q1" value="A" required> A) Watches closely and copies diagrams or written content</label>
<label><input type="radio" name="q1" value="B"> B) Listens attentively and asks verbal questions</label>
<label><input type="radio" name="q1" value="C"> C) Engages physically with materials</label>
</div>
<div class="question" tabindex="0">
<h3>2. During group work, the learner usually...</h3>
<label><input type="radio" name="q2" value="A" required> A) Volunteers to write or draw</label>
<label><input type="radio" name="q2" value="B"> B) Leads discussions or explains ideas</label>
<label><input type="radio" name="q2" value="C"> C) Builds, arranges, or demonstrates concepts</label>
</div>
<div class="question" tabindex="0">
<h3>3. When learning a new skill, the learner prefers...</h3>
<label><input type="radio" name="q3" value="A" required> A) Seeing step-by-step instructions or diagrams</label>
<label><input type="radio" name="q3" value="B"> B) Listening to explanations or talking it through</label>
<label><input type="radio" name="q3" value="C"> C) Trying it out hands-on immediately</label>
</div>
<div class="question" tabindex="0">
<h3>4. To remember information, the learner...</h3>
<label><input type="radio" name="q4" value="A" required> A) Visualizes or draws it</label>
<label><input type="radio" name="q4" value="B"> B) Repeats it out loud or listens to recordings</label>
<label><input type="radio" name="q4" value="C"> C) Practices or acts it out</label>
</div>
<div class="question" tabindex="0">
<h3>5. If unsure about a topic, the learner...</h3>
<label><input type="radio" name="q5" value="A" required> A) Looks for charts or visual aids</label>
<label><input type="radio" name="q5" value="B"> B) Asks questions or discusses with others</label>
<label><input type="radio" name="q5" value="C"> C) Experiments to figure it out</label>
</div>
<div class="question" tabindex="0">
<h3>6. When following directions, the learner prefers...</h3>
<label><input type="radio" name="q6" value="A" required> A) Written instructions or maps</label>
<label><input type="radio" name="q6" value="B"> B) Verbal instructions</label>
<label><input type="radio" name="q6" value="C"> C) Demonstrations or physically following along</label>
</div>
<div class="question" tabindex="0">
<h3>7. In class, the learner is most engaged when...</h3>
<label><input type="radio" name="q7" value="A" required> A) Watching videos or presentations</label>
<label><input type="radio" name="q7" value="B"> B) Listening to stories or lectures</label>
<label><input type="radio" name="q7" value="C"> C) Doing experiments or activities</label>
</div>
<div class="question" tabindex="0">
<h3>8. When working independently, the learner...</h3>
<label><input type="radio" name="q8" value="A" required> A) Makes lists or mind maps</label>
<label><input type="radio" name="q8" value="B"> B) Talks themselves through the process</label>
<label><input type="radio" name="q8" value="C"> C) Moves around or manipulates objects</label>
</div>
<div class="question" tabindex="0">
<h3>9. The learner enjoys...</h3>
<label><input type="radio" name="q9" value="A" required> A) Drawing, painting, or watching demonstrations</label>
<label><input type="radio" name="q9" value="B"> B) Listening to music, podcasts, or conversations</label>
<label><input type="radio" name="q9" value="C"> C) Sports, drama, or building things</label>
</div>
<div class="question" tabindex="0">
<h3>10. During revision, the learner...</h3>
<label><input type="radio" name="q10" value="A" required> A) Writes summaries or uses flashcards</label>
<label><input type="radio" name="q10" value="B"> B) Reads aloud or discusses with friends</label>
<label><input type="radio" name="q10" value="C"> C) Re-enacts or uses movement to revise</label>
</div>
<div class="question" tabindex="0">
<h3>11. The learner gets frustrated if...</h3>
<label><input type="radio" name="q11" value="A" required> A) There are no pictures or visual aids</label>
<label><input type="radio" name="q11" value="B"> B) They can’t discuss or hear explanations</label>
<label><input type="radio" name="q11" value="C"> C) They can’t participate physically</label>
</div>
<div class="question" tabindex="0">
<h3>12. When telling a story, the learner...</h3>
<label><input type="radio" name="q12" value="A" required> A) Describes what things looked like</label>
<label><input type="radio" name="q12" value="B"> B) Focuses on what was said or heard</label>
<label><input type="radio" name="q12" value="C"> C) Acts it out with gestures</label>
</div>
<div class="question" tabindex="0">
<h3>13. The learner chooses...</h3>
<label><input type="radio" name="q13" value="A" required> A) Books with lots of pictures</label>
<label><input type="radio" name="q13" value="B"> B) Audiobooks or group readings</label>
<label><input type="radio" name="q13" value="C"> C) Hands-on kits or activities</label>
</div>
<div class="question" tabindex="0">
<h3>14. In a museum, the learner...</h3>
<label><input type="radio" name="q14" value="A" required> A) Observes displays and reads explanations</label>
<label><input type="radio" name="q14" value="B"> B) Listens to audio guides or explanations</label>
<label><input type="radio" name="q14" value="C"> C) Touches exhibits or tries interactive displays</label>
</div>
<div class="question" tabindex="0">
<h3>15. When introduced to a new concept, the learner...</h3>
<label><input type="radio" name="q15" value="A" required> A) Needs to see an example or visual explanation</label>
<label><input type="radio" name="q15" value="B"> B) Needs to hear a clear explanation</label>
<label><input type="radio" name="q15" value="C"> C) Needs to try it out or be involved physically</label>
</div>
<button type="button" onclick="calculateResult()">Submit</button>
</form>
<div class="modal-overlay" id="resultModalOverlay" tabindex="-1" aria-modal="true" role="dialog">
<div class="modal" tabindex="0">
<button class="close-x" onclick="closeModal()" aria-label="Close">×</button>
<div id="result"></div>
<button onclick="closeModal()">Close</button>
</div>
</div>
<script>
function updateProgress() {
const total = 15;
let answered = 0;
for (let i = 1; i <= total; i++) {
if (document.querySelector('input[name="q'+i+'"]:checked')) answered++;
}
document.getElementById("progressBar").style.width = (answered / total * 100) + "%";
}
document.getElementById("quizForm").addEventListener("change", updateProgress);
function calculateResult() {
const form = document.forms['quizForm'];
let scoreA = 0, scoreB = 0, scoreC = 0;
for (let i = 1; i <= 15; i++) {
const selected = form['q'+i];
if (!selected || !selected.value) {
document.querySelector('.question:nth-child(' + (i+1) + ')').scrollIntoView({behavior: "smooth"});
document.querySelector('.question:nth-child(' + (i+1) + ')').focus();
return;
}
if (selected.value === "A") scoreA++;
else if (selected.value === "B") scoreB++;
else if (selected.value === "C") scoreC++;
}
let resultHtml = "";
if (scoreA > scoreB && scoreA > scoreC) {
resultHtml = `
<strong>Learner is a <span style="color:#43cea2">Visual Learner</span></strong><br><br>
<em>How Teachers Can Help:</em>
<ul>
<li>Use diagrams, charts, and color-coded notes to explain concepts.</li>
<li>Encourage drawing or mind-mapping to organize information.</li>
<li>Show videos and visual demonstrations in lessons.</li>
<li>Provide handouts or slides with key visuals.</li>
<li>Let students create posters or infographics as assignments.</li>
</ul>
<div style="font-size:0.95em;color:#aaa;">
Visual learners absorb information best through images, spatial understanding, and observation.
</div>
`;
} else if (scoreB > scoreA && scoreB > scoreC) {
resultHtml = `
<strong>Learner is an <span style="color:#43cea2">Auditory Learner</span></strong><br><br>
<em>How Teachers Can Help:</em>
<ul>
<li>Explain concepts aloud and use storytelling techniques.</li>
<li>Encourage discussion, debates, and group sharing.</li>
<li>Use rhymes, songs, or mnemonic devices for memorization.</li>
<li>Allow students to record lessons or listen to podcasts.</li>
<li>Invite learners to repeat instructions and explain concepts to peers.</li>
</ul>
<div style="font-size:0.95em;color:#aaa;">
Auditory learners remember information best when they hear it.
</div>
`;
} else if (scoreC > scoreA && scoreC > scoreB) {
resultHtml = `
<strong>Learner is a <span style="color:#43cea2">Kinesthetic Learner</span></strong><br><br>
<em>How Teachers Can Help:</em>
<ul>
<li>Plan hands-on activities such as experiments and role-plays.</li>
<li>Encourage building models, using manipulatives, or acting out scenarios.</li>
<li>Incorporate movement breaks and active learning games.</li>
<li>Let students take notes using gestures or drawing while moving around.</li>
<li>Provide opportunities for field trips and real-world exploration.</li>
</ul>
<div style="font-size:0.95em;color:#aaa;">
Kinesthetic learners understand best by doing.
</div>
`;
} else {
resultHtml = `
<strong>Mixed Learning Style – <span style="color:#43cea2">Blended Approach Recommended</span></strong><br><br>
<em>How Teachers Can Help:</em>
<ul>
<li>Combine visual, auditory, and hands-on activities when teaching.</li>
<li>Offer choices in assignments: presentations, written work, or creative projects.</li>
<li>Rotate teaching techniques regularly to engage all senses.</li>
<li>Encourage students to explore and discover which methods work best for them.</li>
<li>Use collaborative projects that incorporate multiple learning styles.</li>
</ul>
<div style="font-size:0.95em;color:#aaa;">
A blended approach ensures all learners’ preferences are addressed.
</div>
`;
}
document.getElementById("result").innerHTML = resultHtml;
document.getElementById("resultModalOverlay").classList.add('active');
document.querySelector('.modal').focus();
}
function closeModal() {
document.getElementById("resultModalOverlay").classList.remove('active');
}
document.addEventListener('keydown', function(event) {
if (event.key === "Escape") closeModal();
});
document.getElementById("resultModalOverlay").addEventListener('transitionend', function() {
if (this.classList.contains('active')) {
document.querySelector('.modal').focus();
}
});
updateProgress();
</script>
</body>
</html>