-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexam_page_content.html
More file actions
706 lines (578 loc) · 22 KB
/
exam_page_content.html
File metadata and controls
706 lines (578 loc) · 22 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
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
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-dns-prefetch-control" content="off"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex"/>
<title>Login | MUT</title>
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary-color: #09294D;
--secondary-color: #0056b3;
--error-color: #dc3545;
--input-height: 3.125rem;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #dcdcdc, #c0c0c0);
min-height: 100vh;
display: flex;
flex-direction: column;
}
.login-container {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
}
.login-card {
width: 100%;
max-width: 420px;
border-radius: 20px;
box-shadow: 0 12px 30px rgba(0,0,0,.25);
background: rgba(255,255,255,.15);
backdrop-filter: blur(15px);
border: 1px solid rgba(255,255,255,.3);
}
.card-header {
text-align: center;
padding: 1.5rem;
color: #fff;
}
.card-header h2 {
font-weight: 700;
margin: 0;
}
.card-body {
padding: 2rem;
color: #fff;
}
.input-group {
height: var(--input-height);
margin-bottom: 1.2rem;
}
.input-group-text {
width: 3rem;
justify-content: center;
background: #f1f3f5;
border-right: none;
}
.form-control {
border-left: none;
}
.form-control:focus {
box-shadow: 0 0 0 .25rem rgba(9,41,77,.25);
border-color: var(--primary-color);
}
.btn-login {
height: calc(var(--input-height) + 10px);
background: var(--primary-color);
color: #fff;
font-weight: 500;
border-radius: 8px;
width: 100%;
max-width: 300px;
margin: 10px auto 0;
}
.btn-login:hover {
background: var(--secondary-color);
}
.forgot-password {
display: block;
text-align: center;
margin-top: 1rem;
color: #fff;
font-size: .9rem;
text-decoration: none;
}
.forgot-password:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<!-- Header -->
<!-- Professional Header -->
<header class="header">
<div class="container-fluid">
<div class="row align-items-center">
<!-- Logo Column -->
<div class="col-3 col-md-2">
<a href="index.jsp" class="logo-link">
<img src="IMG/mut-45yearslogo-whitetrans1024x362-1-12@2x.png"
alt="MUT Logo"
class="header-logo">
</a>
</div>
<!-- Title Column -->
<div class="col-6 col-md-8 text-center">
<h1 class="header-title">Web-Based Online Assessment System</h1>
<p class="header-subtitle">CodeSA Institute | Professional Testing Platform</p>
</div>
<!-- Navigation Column -->
<div class="col-3 col-md-2">
<nav class="header-nav">
<div class="nav-links">
<a href="signup.jsp" class="nav-link signup-link">
<i class="fas fa-user-plus"></i>
<span class="link-text">Sign Up</span>
</a>
</div>
</nav>
</div>
</div>
</div>
</header>
<!-- Display success/error messages -->
<!-- Logout Loader Overlay -->
<div id="logoutLoader" class="logout-loader">
<div class="loader-content">
<div class="loader-wave"></div>
<div class="loader-text">
Securely logging you out
<span class="dot">.</span>
<span class="dot">.</span>
<span class="dot">.</span>
</div>
</div>
</div>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg=="
crossorigin="anonymous"
referrerpolicy="no-referrer" />
<style>
/* ---------- Logout Loader ---------- */
.logout-loader {
position: fixed;
inset: 0;
background: #09294d;
display: flex;
align-items: center;
justify-content: center;
z-index: 99999;
opacity: 0;
pointer-events: none;
transition: opacity 0.5s ease;
}
.logout-loader.show {
opacity: 1;
pointer-events: all;
}
.loader-content { text-align: center; }
.loader-wave {
width: 14vmin;
height: 14vmin;
border-radius: 50%;
background: rgba(255, 255, 255, 0.15);
position: relative;
animation: breath 2.2s infinite ease-in-out;
margin: 0 auto;
}
.loader-wave::before,
.loader-wave::after {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
background: inherit;
animation: breath 2.2s infinite ease-in-out;
}
.loader-wave::before { animation-delay: 0.7s; }
.loader-wave::after { animation-delay: 1.4s; }
@keyframes breath {
0%, 100% { transform: scale(1); opacity: 0.4; }
50% { transform: scale(1.4); opacity: 0.8; }
}
.loader-text {
color: #fff;
font-size: 1.1rem;
margin-top: 2.5rem;
letter-spacing: 0.5px;
font-family: 'Segoe UI', 'Roboto', sans-serif;
}
.dot {
animation: dotPulse 1.2s infinite;
opacity: 0.3;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
0%, 60%, 100% { opacity: 0.3; }
30% { opacity: 1; }
}
/* ---------- Header ---------- */
:root {
--primary-blue: #09294d;
--secondary-blue: #1a3d6d;
--text-white: #ffffff;
--text-light: #e0e9ff;
--transition-speed: 0.2s;
}
.header {
background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
padding: 12px 0;
border-bottom: 2px solid var(--text-white);
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 2px 12px rgba(0,0,0,0.15);
font-family: 'Segoe UI', 'Roboto', sans-serif;
color: var(--text-white);
}
.header-logo { max-height: 42px; width: auto; transition: transform 0.3s ease; }
.logo-link:hover .header-logo { transform: translateY(-1px); opacity: 0.95; }
.header-title { color: var(--text-white); font-size: 1.125rem; font-weight: 600; margin: 0; text-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.header-subtitle { color: var(--text-light); font-size: 0.75rem; margin: 2px 0 0; opacity: 0.9; }
.header-nav { display: flex; justify-content: flex-end; }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-link { color: var(--text-white); text-decoration: none; font-weight: 500; font-size: 0.8125rem; padding: 6px 12px; border-radius: 4px; transition: all var(--transition-speed) ease; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; gap: 6px; cursor: pointer; }
button.nav-link { border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.08); }
button.nav-link:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); border-color: rgba(255,255,255,0.3); }
.nav-link i { font-size: 0.6875rem; }
.login-link:hover { background: rgba(74,144,226,0.2); }
.signup-link:hover { background: rgba(46,204,113,0.2); }
.logout-link:hover { background: rgba(231,76,60,0.2); }
@media (max-width: 767.98px) { .header-logo { max-height: 36px; } .header-title { font-size: 0.875rem; } .header-subtitle { font-size: 0.625rem; } .nav-link { padding: 5px 8px; font-size: 0.75rem; } }
/* Loading state for submit/logout buttons */
button.nav-link.loading,
input[type="submit"].loading,
button[type="submit"].loading {
opacity: 0.9;
pointer-events: none;
cursor: default;
}
button.nav-link.loading::after,
input[type="submit"].loading::after,
button[type="submit"].loading::after {
content: '';
display: inline-block;
width: 14px;
height: 14px;
margin-left: 8px;
vertical-align: middle;
border: 2px solid rgba(255,255,255,0.85);
border-top-color: transparent;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.logout-loader {
transition: opacity 1s ease; /* was 0.5s */
}
</style>
<script>
// Unified header script: form submit loading, form resets, and logout loader with minimum display time
document.addEventListener('DOMContentLoaded', function () {
const MIN_DISPLAY_TIME = 3000; // minimum loader time in ms
const logoutButtons = document.querySelectorAll('#logoutBtn');
const logoutLoader = document.getElementById('logoutLoader');
// Form handling: show loading state on submit, handle reset buttons
const forms = document.querySelectorAll('form');
forms.forEach(form => {
form.addEventListener('submit', function (e) {
// find either button or input submit
const submit = this.querySelector('button[type="submit"], input[type="submit"]');
if (submit) {
submit.classList.add('loading');
submit.disabled = true;
}
});
});
const resetButtons = document.querySelectorAll('button[type="reset"]');
resetButtons.forEach(btn => {
btn.addEventListener('click', function () {
const form = this.closest('form');
if (form) form.reset();
});
});
// Logout handler: show loader and ensure minimum display time before navigating
if (logoutButtons && logoutButtons.length && logoutLoader) {
logoutButtons.forEach(btn => {
btn.addEventListener('click', function (e) {
e.preventDefault();
const start = Date.now();
// disable button to avoid double clicks
try { btn.disabled = true; } catch (err) {}
btn.classList.add('loading');
// show overlay
logoutLoader.classList.add('show');
logoutLoader.setAttribute('aria-hidden', 'false');
document.body.style.pointerEvents = 'none';
// Ensure a smooth and minimum visible duration, then navigate
const navigate = function () {
window.location.href = 'controller.jsp?page=logout';
};
const elapsed = Date.now() - start;
const wait = Math.max(0, MIN_DISPLAY_TIME - elapsed);
setTimeout(navigate, wait);
});
});
}
});
</script>
<div class="login-container">
<div class="login-card">
<div class="card-header">
<h2><i class="fas fa-sign-in-alt me-2"></i>Login</h2>
</div>
<div class="card-body">
<form method="post" action="controller.jsp">
<input type="hidden" name="page" value="login"/>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-user"></i></span>
<input type="text"
class="form-control"
name="username"
placeholder="MUT Identity Number"
required
autofocus>
</div>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-lock"></i></span>
<input type="password"
class="form-control"
name="password"
placeholder="Password"
required>
</div>
<button type="submit" class="btn btn-login w-100">
<i class="fas fa-sign-in-alt me-2"></i>Login
</button>
<a href="Forgot_Password.jsp" class="forgot-password">
<i class="fas fa-question-circle me-2"></i>Forgot Password?
</a>
</form>
</div>
</div>
</div>
<!-- Footer -->
<footer class="mt-auto">
<footer class="footer text-white py-3" style="background-color:#09294d;">
<div class="container">
<div class="row align-items-center">
<!-- Left Column: Company Info -->
<div class="col-md-4 mb-3 mb-md-0">
<div class="footer-content">
<h5 class="footer-title mb-2" style="color: #FFFFFF; font-size: 1rem;">CodeSA Institute</h5>
<ul class="list-unstyled mb-0">
<li class="footer-item mb-1 d-flex align-items-center">
<i class="fas fa-user-tie me-2" style="color: #FFFFFF; font-size: 0.9rem;"></i>
<span style="font-size: 0.9rem; color: #FFFFFF;">Manager: <strong>Mrs. L. Mthethwa</strong></span>
</li>
<li class="footer-item mb-1 d-flex align-items-center">
<i class="fas fa-envelope me-2" style="color: #FFFFFF; font-size: 0.9rem;"></i>
<span style="font-size: 0.9rem; color: #FFFFFF;">
Email: <a href="mailto:info@codingmadeeasy.org" class="text-white text-decoration-none" style="font-size: 0.9rem;">info@codingmadeeasy.org</a>
</span>
</li>
<li class="footer-item mb-1 d-flex align-items-center">
<i class="fas fa-map-marker-alt me-2" style="color: #FFFFFF; font-size: 0.9rem;"></i>
<span style="font-size: 0.9rem; color: #FFFFFF;">Durban, South Africa</span>
</li>
</ul>
</div>
</div>
<!-- Center Column: Logo -->
<div class="col-md-4 mb-3 mb-md-0">
<div class="footer-logo-container text-center">
<img src="IMG/mut-45yearslogo-whitetrans1024x362-12@2x.png" alt="MUT 45 Years Logo" class="footer-logo img-fluid" style="max-width: 200px; height: auto;">
<div class="mt-2">
<small style="color: #CCCCCC; font-size: 0.8rem;">Official Partner</small>
</div>
</div>
</div>
<!-- Right Column: Developer Info -->
<div class="col-md-4">
<div class="footer-content">
<h5 class="footer-title mb-2" style="color: #FFFFFF; font-size: 1rem;">Development Team</h5>
<ul class="list-unstyled mb-0">
<li class="footer-item mb-1 d-flex align-items-center">
<i class="fas fa-code me-2" style="color: #FFFFFF; font-size: 0.9rem;"></i>
<span style="font-size: 0.9rem; color: #FFFFFF;">Developer: <strong>Maphumulo SA</strong></span>
</li>
<li class="footer-item mb-1 d-flex align-items-center">
<i class="fas fa-phone me-2" style="color: #FFFFFF; font-size: 0.9rem;"></i>
<span style="font-size: 0.9rem; color: #FFFFFF;">Tel: <strong>068 676 4623</strong></span>
</li>
<li class="footer-item mb-1 d-flex align-items-center">
<!-- <i class="fas fa-fax me-2" style="color: #FFFFFF; font-size: 0.9rem;"></i>
<span style="font-size: 0.9rem; color: #FFFFFF;">Fax: <strong>031 907 7655</strong></span>-->
</li>
<li class="footer-item mb-1 d-flex align-items-center">
<i class="fas fa-envelope me-2" style="color: #FFFFFF; font-size: 0.9rem;"></i>
<span style="font-size: 0.9rem; color: #FFFFFF;">
Email: <a href="mailto:Siphelelemaphumulo@gmail.com" class="text-white text-decoration-none" style="font-size: 0.9rem;">Siphelelemaphumulo@gmail.com</a>
</span>
</li>
</ul>
</div>
</div>
</div>
<!-- Copyright / Bottom Row -->
<div class="row mt-3 pt-2 border-top border-secondary">
<div class="col-12 text-center">
<p class="mb-0" style="color: #CCCCCC; font-size: 0.8rem;">
<i class="far fa-copyright me-1" style="color: #CCCCCC;"></i>
<span id="currentYear"></span> CodeSA Institute. All rights reserved.
<span class="mx-1">|</span>
<a href="#" class="text-decoration-none" style="color: #CCCCCC; font-size: 0.8rem;">Privacy Policy</a>
<span class="mx-1">?</span>
<a href="#" class="text-decoration-none" style="color: #CCCCCC; font-size: 0.8rem;">Terms of Service</a>
</p>
</div>
</div>
</div>
</footer>
<style>
:root {
--primary-blue: #09294d;
--secondary-blue: #1a3d6d;
--text-white: #ffffff;
--text-light: #e0e9ff;
--transition-speed: 0.2s;
}
/* Professional Compact Footer Styling */
.footer {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.footer-title {
font-weight: 600;
letter-spacing: 0.3px;
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
padding-bottom: 5px;
display: inline-block;
}
.footer-content {
padding: 5px 0;
}
.footer-item {
line-height: 1.4;
transition: all 0.2s ease;
}
.footer-item:hover {
transform: translateX(3px);
}
.footer-item i {
width: 18px;
text-align: center;
}
.footer-logo {
filter: brightness(0) invert(1);
opacity: 0.9;
transition: all 0.2s ease;
}
.footer-logo:hover {
opacity: 1;
transform: scale(1.03);
}
.footer-logo-container {
padding: 8px 0;
}
a:hover {
color: #4dabf7 !important;
text-decoration: underline !important;
}
.border-secondary {
border-color: rgba(255, 255, 255, 0.1) !important;
}
/* Responsive Adjustments */
@media (max-width: 768px) {
.footer {
text-align: center;
padding: 1.5rem 0 !important;
}
.footer-content {
margin-bottom: 1rem;
}
.footer-item {
justify-content: center !important;
}
.footer-logo {
max-width: 180px !important;
}
.footer-title {
font-size: 1.1rem !important;
}
.footer-item span {
font-size: 0.95rem !important;
}
}
@media (max-width: 576px) {
.footer {
padding: 1rem 0 !important;
}
.footer-logo {
max-width: 150px !important;
}
.row {
flex-direction: column;
}
.col-md-4 {
margin-bottom: 1.5rem;
}
.col-md-4:last-child {
margin-bottom: 0;
}
}
</style>
<script>
// Set current year in copyright
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('currentYear').textContent = new Date().getFullYear();
// Add smooth hover effect for footer items
const footerItems = document.querySelectorAll('.footer-item');
footerItems.forEach(item => {
item.addEventListener('mouseenter', function() {
this.style.transform = 'translateX(3px)';
});
item.addEventListener('mouseleave', function() {
this.style.transform = 'translateX(0)';
});
});
// Add hover effect for links
const links = document.querySelectorAll('a');
links.forEach(link => {
link.addEventListener('mouseenter', function() {
this.style.textDecoration = 'underline';
});
link.addEventListener('mouseleave', function() {
this.style.textDecoration = 'none';
});
});
});
</script>
</footer>
<!-- Toasts -->
<div class="position-fixed top-0 end-0 p-3" style="z-index:1080">
<!-- Error -->
<div id="toastError" class="toast text-bg-danger border-0" data-bs-delay="5000">
<div class="d-flex">
<div class="toast-body">
</div>
<button class="btn-close btn-close-white m-auto me-2" data-bs-dismiss="toast"></button>
</div>
</div>
<!-- Success -->
<div id="toastSuccess" class="toast text-bg-success border-0 mt-2" data-bs-delay="4000">
<div class="d-flex">
<div class="toast-body">
</div>
<button class="btn-close btn-close-white m-auto me-2" data-bs-dismiss="toast"></button>
</div>
</div>
</div>
<!-- Bootstrap -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
});
</script>
</body>
</html>