-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz.html
More file actions
523 lines (493 loc) · 25.7 KB
/
Copy pathquiz.html
File metadata and controls
523 lines (493 loc) · 25.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Computer Science Q&A Examination System - Test your knowledge with interactive quizzes">
<meta name="keywords" content="computer science quiz, programming test, CS examination, coding assessment">
<meta name="author" content="Md Asif">
<title>CS Q&A Examination System | DevLearn</title>
<link rel="icon" type="image/png" href="image/web.png">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="quiz/css/quiz-styles.css">
<!-- Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
<!-- Particle Canvas Background -->
<canvas id="particleCanvas"></canvas>
<!-- Floating Dev Icons -->
<div class="floating-icons" id="floatingIcons"></div>
<!-- Dynamic Header -->
<div id="header-placeholder"></div>
<!-- Quiz Selection Section -->
<section class="quiz-selection" id="quizSelection">
<div class="container">
<div class="quiz-hero-content">
<div class="hero-badge">
<i class="fas fa-graduation-cap"></i>
<span>Computer Science Examination</span>
</div>
<h1 class="hero-title">
Test Your Knowledge<br>
<span class="gradient-text glow-text">Choose Your Challenge</span>
</h1>
<p class="hero-description">
</p>
<!-- Quiz Level Cards -->
<div class="quiz-levels">
<!-- Fundamentals Level -->
<div class="quiz-level-card glow-card" data-level="fundamentals">
<div class="level-header">
<div class="level-icon">
<i class="fas fa-seedling"></i>
</div>
<div class="level-badge">Level 1</div>
</div>
<h3>Fundamentals</h3>
<p>Perfect for beginners! Cover the basics of programming, web development, and computer science fundamentals.</p>
<div class="level-stats">
<div class="stat">
<i class="fas fa-question-circle"></i>
<span>81 Questions</span>
</div>
<div class="stat">
<i class="fas fa-clock"></i>
<span>~30 minutes</span>
</div>
<div class="stat">
<i class="fas fa-star"></i>
<span>Beginner</span>
</div>
</div>
<div class="level-topics">
<span class="topic-tag">HTML/CSS</span>
<span class="topic-tag">JavaScript Basics</span>
<span class="topic-tag">Programming Concepts</span>
<span class="topic-tag">Web Development</span>
</div>
<button class="btn btn-primary start-quiz-btn" data-level="fundamentals">
<i class="fas fa-play"></i> Start Fundamentals Quiz
</button>
</div>
<!-- Intermediate Level -->
<div class="quiz-level-card glow-card" data-level="intermediate">
<div class="level-header">
<div class="level-icon">
<i class="fas fa-cogs"></i>
</div>
<div class="level-badge">Level 2</div>
</div>
<h3>Intermediate</h3>
<p>For those with some experience. Dive deeper into programming concepts, data structures, and software engineering.</p>
<div class="level-stats">
<div class="stat">
<i class="fas fa-question-circle"></i>
<span>80 Questions</span>
</div>
<div class="stat">
<i class="fas fa-clock"></i>
<span>~45 minutes</span>
</div>
<div class="stat">
<i class="fas fa-star"></i>
<span>Intermediate</span>
</div>
</div>
<div class="level-topics">
<span class="topic-tag">OOP Concepts</span>
<span class="topic-tag">Data Structures</span>
<span class="topic-tag">Databases</span>
<span class="topic-tag">Software Engineering</span>
</div>
<button class="btn btn-primary start-quiz-btn" data-level="intermediate">
<i class="fas fa-play"></i> Start Intermediate Quiz
</button>
</div>
<!-- Advanced Level -->
<div class="quiz-level-card glow-card" data-level="advanced">
<div class="level-header">
<div class="level-icon">
<i class="fas fa-rocket"></i>
</div>
<div class="level-badge">Level 3</div>
</div>
<h3>Advanced</h3>
<p>Expert level challenges! Test your knowledge of advanced algorithms, system design, and cutting-edge technologies.</p>
<div class="level-stats">
<div class="stat">
<i class="fas fa-question-circle"></i>
<span>60 Questions</span>
</div>
<div class="stat">
<i class="fas fa-clock"></i>
<span>~40 minutes</span>
</div>
<div class="stat">
<i class="fas fa-star"></i>
<span>Expert</span>
</div>
</div>
<div class="level-topics">
<span class="topic-tag">Advanced Algorithms</span>
<span class="topic-tag">System Design</span>
<span class="topic-tag">Cloud Computing</span>
<span class="topic-tag">AI/ML</span>
</div>
<button class="btn btn-primary start-quiz-btn" data-level="advanced">
<i class="fas fa-play"></i> Start Advanced Quiz
</button>
</div>
<!-- Software-Dev Level -->
<div class="quiz-level-card glow-card" data-level="software-dev">
<div class="level-header">
<div class="level-icon">
<i class="fas fa-code"></i>
</div>
<div class="level-badge">Special</div>
</div>
<h3>Software-Dev</h3>
<p>Specialized software development questions covering industry best practices, tools, and real-world scenarios.</p>
<div class="level-stats">
<div class="stat">
<i class="fas fa-question-circle"></i>
<span>60 Questions</span>
</div>
<div class="stat">
<i class="fas fa-clock"></i>
<span>~35 minutes</span>
</div>
<div class="stat">
<i class="fas fa-star"></i>
<span>Professional</span>
</div>
</div>
<div class="level-topics">
<span class="topic-tag">DevOps</span>
<span class="topic-tag">Testing</span>
<span class="topic-tag">Architecture</span>
<span class="topic-tag">Tools & Practices</span>
</div>
<button class="btn btn-primary start-quiz-btn" data-level="software-dev">
<i class="fas fa-play"></i> Start Software-Dev Quiz
</button>
</div>
<!-- Software Development Skills Foundation (Python) -->
<div class="quiz-level-card glow-card" data-level="software-dev-python">
<div class="level-header">
<div class="level-icon">
<i class="fab fa-python"></i>
</div>
<div class="level-badge">Foundation</div>
</div>
<h3>Software Development Skills Foundation (Python)</h3>
<p>Build a solid Python foundation with hands-on questions focused on core language features and practical software development workflows.</p>
<div class="level-stats">
<div class="stat">
<i class="fas fa-question-circle"></i>
<span>81 Questions</span>
</div>
<div class="stat">
<i class="fas fa-clock"></i>
<span>~25 minutes</span>
</div>
<div class="stat">
<i class="fas fa-star"></i>
<span>Level 1</span>
</div>
</div>
<div class="level-topics">
<span class="topic-tag">Python Syntax</span>
<span class="topic-tag">Problem Solving</span>
<span class="topic-tag">Automation</span>
<span class="topic-tag">Best Practices</span>
</div>
<button class="btn btn-primary start-quiz-btn" data-level="software-dev-python">
<i class="fas fa-play"></i> Start Python Foundation Quiz
</button>
</div>
<!-- Software Development Skills Foundation (Python) Level 2 -->
<div class="quiz-level-card glow-card" data-level="software-dev-python-level2">
<div class="level-header">
<div class="level-icon">
<i class="fab fa-python"></i>
</div>
<div class="level-badge">Level 2</div>
</div>
<h3>Software Development Skills Foundation (Python)</h3>
<p>Advance your Python skills with intermediate-level questions covering advanced language features, design patterns, and real-world development scenarios.</p>
<div class="level-stats">
<div class="stat">
<i class="fas fa-question-circle"></i>
<span id="python-level2-count">0</span> Questions
</div>
<div class="stat">
<i class="fas fa-clock"></i>
<span>~30 minutes</span>
</div>
<div class="stat">
<i class="fas fa-star"></i>
<span>Intermediate</span>
</div>
</div>
<div class="level-topics">
<span class="topic-tag">Advanced Python</span>
<span class="topic-tag">Design Patterns</span>
<span class="topic-tag">Best Practices</span>
<span class="topic-tag">Real-World Scenarios</span>
</div>
<button class="btn btn-primary start-quiz-btn" data-level="software-dev-python-level2">
<i class="fas fa-play"></i> Start Python Level 2 Quiz
</button>
</div>
</div>
<!-- Quick Stats -->
<div class="quiz-stats">
<div class="stat-item">
<i class="fas fa-database"></i>
<span class="stat-count">200+</span>
<span class="stat-text">Questions</span>
</div>
<div class="stat-item">
<i class="fas fa-users"></i>
<span class="stat-count">6</span>
<span class="stat-text">Quiz Categories</span>
</div>
<div class="stat-item">
<i class="fas fa-lightbulb"></i>
<span class="stat-count">100%</span>
<span class="stat-text">Free Access</span>
</div>
</div>
</div>
</div>
</section>
<!-- Quiz Interface (Hidden Initially) -->
<section class="quiz-interface" id="quizInterface" style="display: none;">
<div class="container">
<!-- Quiz Header -->
<div class="quiz-header">
<div class="quiz-info">
<div class="quiz-level-info">
<span class="level-badge" id="currentLevelBadge">Level 1</span>
<span class="level-name" id="currentLevelName">Fundamentals</span>
</div>
<div class="quiz-progress">
<div class="progress-bar">
<div class="progress-fill" id="progressFill"></div>
</div>
<span class="progress-text" id="progressText">Question 1 of 60</span>
</div>
</div>
<div class="quiz-actions">
<div class="user-info" style="display: flex; align-items: center; margin-right: 10px; color: #fff;">
<i class="fas fa-user-circle" style="margin-right: 5px;"></i>
<span id="userEmail" style="font-size: 0.9em;"></span>
</div>
<button class="btn btn-secondary" id="logoutBtn" title="Logout">
<i class="fas fa-sign-out-alt"></i> Logout
</button>
<button class="btn btn-secondary" id="pauseQuiz">
<i class="fas fa-pause"></i> Pause
</button>
<button class="btn btn-secondary" id="exitQuiz">
<i class="fas fa-times"></i> Exit
</button>
</div>
</div>
<!-- Question Container -->
<div class="question-container">
<div class="question-card glow-card">
<!-- Question Number & Timer -->
<div class="question-header">
<div class="question-number">
<span id="questionNumber">1</span>
</div>
<div class="question-timer" id="questionTimer">
<i class="fas fa-clock"></i>
<span id="timerDisplay">--:--</span>
</div>
</div>
<!-- Question Content -->
<div class="question-content">
<h3 class="question-text" id="questionText">
What is the correct way to declare a variable in JavaScript?
</h3>
<div class="question-image" id="questionImage" style="display: none;">
<!-- Code snippets or diagrams will be inserted here -->
</div>
<div class="question-code" id="questionCode" style="display: none;">
<!-- Code examples will be rendered here -->
</div>
<div class="question-table-container" id="questionTable" style="display: none;">
<!-- Database tables will be rendered here -->
</div>
</div>
<!-- Answer Options -->
<div class="answer-options" id="answerOptions">
<div class="option" data-option="A">
<div class="option-letter">A</div>
<div class="option-text">var name = "John";</div>
</div>
<div class="option" data-option="B">
<div class="option-letter">B</div>
<div class="option-text">variable name = "John";</div>
</div>
<div class="option" data-option="C">
<div class="option-letter">C</div>
<div class="option-text">v name = "John";</div>
</div>
<div class="option" data-option="D">
<div class="option-letter">D</div>
<div class="option-text">declare name = "John";</div>
</div>
</div>
<!-- Submit Button -->
<div class="question-actions">
<button class="btn btn-primary submit-answer-btn" id="submitAnswer" disabled>
<i class="fas fa-check"></i> Submit Answer
</button>
<button class="btn btn-secondary skip-question-btn" id="skipQuestion">
<i class="fas fa-forward"></i> Skip Question
</button>
</div>
</div>
<!-- Feedback Panel (Hidden Initially) -->
<div class="feedback-panel glow-card" id="feedbackPanel" style="display: none;">
<div class="feedback-header">
<div class="feedback-icon" id="feedbackIcon">
<i class="fas fa-check-circle"></i>
</div>
<div class="feedback-title" id="feedbackTitle">Correct!</div>
</div>
<div class="feedback-content">
<div class="feedback-explanation" id="feedbackExplanation">
Great job! The correct syntax for declaring a variable in JavaScript is using the 'var' keyword followed by the variable name and assignment operator.
</div>
<div class="feedback-details">
<div class="detail-item">
<strong>Your Answer:</strong> <span id="userAnswer">A</span>
</div>
<div class="detail-item">
<strong>Correct Answer:</strong> <span id="correctAnswer">A</span>
</div>
<div class="detail-item">
<strong>Points Earned:</strong> <span id="pointsEarned">10</span>
</div>
</div>
</div>
<div class="feedback-actions">
<button class="btn btn-primary next-question-btn" id="nextQuestion">
<i class="fas fa-arrow-right"></i> Next Question
</button>
</div>
</div>
</div>
</div>
</section>
<!-- Quiz Results (Hidden Initially) -->
<section class="quiz-results" id="quizResults" style="display: none;">
<div class="container">
<div class="results-container">
<div class="results-header">
<div class="results-icon">
<i class="fas fa-trophy"></i>
</div>
<h2 class="results-title">Quiz Complete!</h2>
<p class="results-subtitle">Here's how you performed</p>
</div>
<div class="results-stats">
<div class="stat-card glow-card">
<div class="stat-icon">
<i class="fas fa-percentage"></i>
</div>
<div class="stat-content">
<div class="stat-value" id="finalScore">85%</div>
<div class="stat-label">Final Score</div>
</div>
</div>
<div class="stat-card glow-card">
<div class="stat-icon">
<i class="fas fa-check-circle"></i>
</div>
<div class="stat-content">
<div class="stat-value" id="correctAnswers">51</div>
<div class="stat-label">Correct Answers</div>
</div>
</div>
<div class="stat-card glow-card">
<div class="stat-icon">
<i class="fas fa-times-circle"></i>
</div>
<div class="stat-content">
<div class="stat-value" id="incorrectAnswers">9</div>
<div class="stat-label">Incorrect Answers</div>
</div>
</div>
<div class="stat-card glow-card">
<div class="stat-icon">
<i class="fas fa-clock"></i>
</div>
<div class="stat-content">
<div class="stat-value" id="timeSpent">28:45</div>
<div class="stat-label">Time Spent</div>
</div>
</div>
</div>
<div class="results-actions">
<button class="btn btn-primary" id="retakeQuiz">
<i class="fas fa-redo"></i> Retake Quiz
</button>
<button class="btn btn-secondary" id="viewExplanations">
<i class="fas fa-lightbulb"></i> View All Explanations
</button>
<button class="btn btn-secondary" id="backToSelection">
<i class="fas fa-home"></i> Back to Quiz Selection
</button>
</div>
</div>
</div>
</section>
<!-- Dynamic Footer -->
<div id="footer-placeholder"></div>
<!-- Scripts -->
<script src="js/config.js"></script>
<script src="js/auth.js"></script>
<script src="js/components.js"></script>
<script src="js/script.js"></script>
<script src="quiz/js/quiz-software-dev-python.js"></script>
<script src="quiz/js/quiz-software-dev-python-level2.js"></script>
<script src="quiz/js/quiz-data.js"></script>
<script src="quiz/js/quiz-scoring.js"></script>
<script src="quiz/js/quiz-engine.js"></script>
<!-- Authentication Protection -->
<script>
// Protect quiz page - redirect to login if not authenticated
document.addEventListener('DOMContentLoaded', function() {
if (typeof DevLearnAuth !== 'undefined') {
// Check authentication before allowing access
if (!DevLearnAuth.protectPage('login.html')) {
return; // Redirect will happen in protectPage
}
// Display user info if needed
DevLearnAuth.displayUserInfo('userEmail');
// Setup logout button if exists
DevLearnAuth.setupLogoutButton('logoutBtn', 'login.html');
}
});
</script>
<!-- Update question count for Python Level 2 -->
<script>
document.addEventListener('DOMContentLoaded', function() {
if (typeof QuizData !== 'undefined') {
const quizData = new QuizData();
const questions = quizData.getQuestions('software-dev-python-level2');
const countElement = document.getElementById('python-level2-count');
if (countElement && questions) {
countElement.textContent = questions.length;
}
}
});
</script>
</body>
</html>