-
Notifications
You must be signed in to change notification settings - Fork 0
/
add-assessment.html
485 lines (417 loc) · 23.7 KB
/
add-assessment.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Study Sphere</title>
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon.png">
<link rel="stylesheet" href="vendor/jqvmap/css/jqvmap.min.css">
<link rel="stylesheet" href="vendor/chartist/css/chartist.min.css">
<link rel="stylesheet" href="vendor/bootstrap-select/dist/css/bootstrap-select.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/skin-2.css">
</head>
<body>
<div id="preloader">
<div class="sk-three-bounce">
<div class="sk-child sk-bounce1"></div>
<div class="sk-child sk-bounce2"></div>
<div class="sk-child sk-bounce3"></div>
</div>
</div>
<div id="main-wrapper">
<!--nav-header-->
<div class="nav-header">
<a href="index.html" class="brand-logo">
<img class="logo-abbr" src="images/logo2.png" alt="">
<img class="logo-compact" src="images/study.jpg" alt="">
<img class="brand-title" src="images/study.jpg" alt="">
</a>
<div class="nav-control">
<div class="hamburger">
<span class="line"></span><span class="line"></span><span class="line"></span>
</div>
</div>
</div>
<!--Header start-->
<div class="header">
<div class="header-content">
<nav class="navbar navbar-expand">
<div class="collapse navbar-collapse justify-content-between">
<div class="header-left">
<div class="search_bar dropdown">
<span class="search_icon p-3 c-pointer" data-toggle="dropdown">
<i class="mdi mdi-magnify"></i>
</span>
<div class="dropdown-menu p-0 m-0">
<form>
<input class="form-control" type="search" placeholder="Search" aria-label="Search">
</form>
</div>
</div>
</div>
<ul class="navbar-nav header-right">
<li class="nav-item dropdown notification_dropdown">
<a class="nav-link bell ai-icon" href="#" role="button" data-toggle="dropdown">
<svg id="icon-user" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-bell">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
</svg>
<div class="pulse-css"></div>
</a>
<div class="dropdown-menu dropdown-menu-right">
<ul class="list-unstyled">
<li class="media dropdown-item">
<span class="success"><i class="ti-user"></i></span>
<div class="media-body">
<a href="#">
<p><strong>z</strong> has added a <strong>course</strong> Successfully
</p>
</a>
</div>
<span class="notify-time">3:20 am</span>
</li>
<li class="media dropdown-item">
<span class="primary"><i class="ti-shopping-cart"></i></span>
<div class="media-body">
<a href="#">
<p><strong>priya</strong> purchased completed course.</p>
</a>
</div>
<span class="notify-time">3:20 am</span>
</li>
<li class="media dropdown-item">
<span class="danger"><i class="ti-bookmark"></i></span>
<div class="media-body">
<a href="#">
<p><strong>Robin</strong> joined<strong>class</strong>
</p>
</a>
</div>
<span class="notify-time">3:20 am</span>
</li>
<li class="media dropdown-item">
<span class="primary"><i class="ti-heart"></i></span>
<div class="media-body">
<a href="#">
<p><strong>David</strong>created a schedule</p>
</a>
</div>
<span class="notify-time">3:20 am</span>
</li>
<li class="media dropdown-item">
<span class="success"><i class="ti-image"></i></span>
<div class="media-body">
<a href="#">
<p><strong> sneha</strong> has<strong>new class</strong>
</p>
</a>
</div>
<span class="notify-time">3:20 am</span>
</li>
</ul>
<a class="all-notification" href="#">See all notifications <i class="ti-arrow-right"></i></a>
</div>
</li>
<li class="nav-item dropdown header-profile">
<a class="nav-link" href="#" role="button" data-toggle="dropdown">
<img src="images/profile/education/pic1.jpg" width="20" alt="">
</a>
<div class="dropdown-menu dropdown-menu-right">
<a href="app-profile.html" class="dropdown-item ai-icon">
<svg id="icon-user1" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
<span class="ml-2">Profile </span>
</a>
<a href="page-login.html" class="dropdown-item ai-icon">
<svg id="icon-logout" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
<span class="ml-2">Logout </span>
</a>
</div>
</li>
</ul>
</div>
</nav>
</div>
</div>
<div class="dlabnav">
<div class="dlabnav-scroll">
<ul class="metismenu" id="menu">
<li class="nav-label first">Main Menu</li>
<li><a class="has-arrow" href="index.html" aria-expanded="false">
<i class="la la-home"></i>
<span class="nav-text">Dashboard</span>
</a>
</li>
<li><a class="ai-icon" href="app-profile.html" aria-expanded="false">
<i class="la la-user"></i>
<span class="nav-text">Profile</span>
</a>
<li><a class="ai-icon" href="page-register.html" aria-expanded="false">
<i class="la la-th-list"></i>
<span class="nav-text">Register</span>
</a>
</li>
<li><a class="ai-icon" href="page-login.html" aria-expanded="false">
<i class="la la-th-list"></i>
<span class="nav-text">Log in</span>
</a>
<li><a class="ai-icon" href="event-management.html" aria-expanded="false">
<i class="la la-calendar"></i>
<span class="nav-text">Event Management</span>
</a>
</li>
<li><a class="has-arrow" href="javascript:void()" aria-expanded="false">
<i class="la la-user"></i>
<span class="nav-text">Professors</span>
</a>
<ul aria-expanded="false">
<li><a href="all-professors.html">All Professor</a></li>
<li><a href="add-professor.html">Add Professor</a></li>
<li><a href="professor-profile.html">Professor Profile</a></li>
</ul>
</li>
<li><a class="has-arrow" href="javascript:void()" aria-expanded="false">
<i class="la la-users"></i>
<span class="nav-text">Students</span>
</a>
<ul aria-expanded="false">
<li><a href="all-students.html">All Students</a></li>
<li><a href="add-student.html">Add Students</a></li>
<li><a href="about-student.html">About Students</a></li>
</ul>
</li>
<li><a class="has-arrow" href="javascript:void()" aria-expanded="false">
<i class="la la-graduation-cap"></i>
<span class="nav-text">Courses</span>
</a>
<ul aria-expanded="false">
<li><a href="all-courses.html">All Courses</a></li>
<li><a href="add-courses.html">Add Courses</a></li>
<li><a href="about-courses.html">About Courses</a></li>
</ul>
</li>
</li>
<li><a class="has-arrow" href="javascript:void()" aria-expanded="false">
<i class="la la-laptop"></i>
<span class="nav-text">Virtual class</span>
</a>
<ul aria-expanded="false">
<li><a href="http://localhost:8080">chat</a></li>
<li><a href="http://127.0.0.1:8082/06bd01fa-0a61-4a72-b816-32db59474a69">video streaming</a></li>
<li><a href="holiday-calendar.html">Schedule</a></li>
</ul>
</li>
</a>
<ul aria-expanded="false">
</ul>
</li>
<li>
<a class="has-arrow" href="form-element.html" aria-expanded="false">
<i class="la la-file-text"></i>
<span class="nav-text">Assessment</span>
</a>
<ul aria-expanded="false">
<li><a href="form-element.html">Quiz</a></li>
</ul>
<ul aria-expanded="false">
<li><a href="add-assessment.html">Add Assessment</a></li>
</ul>
</li>
</li>
</li> <li><a class="has-arrow" href="https://adamowskya.my.canva.site/original-size-motivational-travel-instagram-reels-video" aria-expanded="false">
<i class="
la la-film"></i>
<span class="nav-text">ReelSpectra</span>
</a>
<li><a class="ai-icon" href="assignment.html" aria-expanded="false">
<i class="la la-edit"></i>
<span class="nav-text">Assignment</span>
</a>
</ul>
</li>
</ul>
</div>
</div>
<div class="container mt-3">
<div class="row justify-content-center">
<div class="col-lg-8">
<div class="card p-4">
<div class="card-header">
<h4 class="card-title">Assessment Details</h4>
</div>
<div class="card-body">
<!-- Add professor name and domain input fields -->
<div class="form-group">
<label class="form-label">Professor Name</label>
<input type="text" class="form-control" name="professorName" id="professorName">
</div>
<div class="form-group">
<label class="form-label">Domain</label>
<input type="text" class="form-control" name="domain" id="domain">
</div>
<form action="/add-assessment" method="post" id="assessmentForm">
<div class="form-group">
<label class="form-label">Question</label>
<textarea class="form-control" rows="5" name="question" id="question"></textarea>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">Option 1</label>
<input type="text" class="form-control" name="option1" id="option1">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">Option 2</label>
<input type="text" class="form-control" name="option2" id="option2">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">Option 3</label>
<input type="text" class="form-control" name="option3" id="option3">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">Option 4</label>
<input type="text" class="form-control" name="option4" id="option4">
</div>
</div>
<div class="col-lg-12">
<button type="button" class="btn btn-primary" onclick="addAssessment()">Add Assessment</button>
<button type="button" class="btn btn-light" onclick="clearForm()">Cancel</button>
</div>
</div>
</form>
<!-- Display Professor Name and Domain -->
<div id="professorInfo"></div>
<!-- Display Assessments -->
<div id="assessmentList">
<!-- Displayed assessments will appear here -->
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// Array to store assessments
var assessments = [];
// Function to add an assessment
function addAssessment() {
var professorName = document.getElementById("professorName").value;
var domain = document.getElementById("domain").value;
var question = document.getElementById("question").value;
var option1 = document.getElementById("option1").value;
var option2 = document.getElementById("option2").value;
var option3 = document.getElementById("option3").value;
var option4 = document.getElementById("option4").value;
// Check if all fields are filled
if (professorName && domain && question && option1 && option2 && option3 && option4) {
// Create an object to represent the assessment
var assessment = {
professorName: professorName,
domain: domain,
question: question,
option1: option1,
option2: option2,
option3: option3,
option4: option4
};
// Add the assessment to the array
assessments.push(assessment);
// Display Professor Name and Domain
displayProfessorInfo();
// Display the assessments
displayAssessments();
// Clear the form
clearForm();
} else {
alert("Please fill out all fields before adding the assessment.");
}
}
// Function to display Professor Name and Domain
function displayProfessorInfo() {
var professorInfo = document.getElementById("professorInfo");
professorInfo.innerHTML = `<strong>Professor Name:</strong> ${assessments[0].professorName}<br><strong>Domain:</strong> ${assessments[0].domain}<hr>`;
}
function displayAssessments() {
var assessmentList = document.getElementById("assessmentList");
assessmentList.innerHTML = ""; // Clear previous content
// Loop through assessments and display them
assessments.forEach(function (assessment, index) {
var assessmentItem = document.createElement("div");
assessmentItem.classList.add("mb-3");
// Create HTML content for the assessment with radio buttons
assessmentItem.innerHTML = `
<strong>Question:</strong> ${assessment.question}<br>
<form id="optionsForm${index}">
<strong>Options:</strong><br>
<div class="form-check">
<input type="radio" class="form-check-input" name="options" value="${assessment.option1}" id="option1${index}" checked>
<label class="form-check-label" for="option1${index}">${assessment.option1}</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="options" value="${assessment.option2}" id="option2${index}">
<label class="form-check-label" for="option2${index}">${assessment.option2}</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="options" value="${assessment.option3}" id="option3${index}">
<label class="form-check-label" for="option3${index}">${assessment.option3}</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" name="options" value="${assessment.option4}" id="option4${index}">
<label class="form-check-label" for="option4${index}">${assessment.option4}</label>
</div>
</form>
<button type="button" class="btn btn-danger" onclick="deleteAssessment(${index})">Delete</button>
<hr>
`;
// Append the assessment to the list
assessmentList.appendChild(assessmentItem);
});
}
// Function to delete an assessment
function deleteAssessment(index) {
assessments.splice(index, 1);
displayAssessments(); // Update the displayed assessments
displayProfessorInfo(); // Update the displayed Professor Name and Domain
}
// Function to clear the form
function clearForm() {
document.getElementById("assessmentForm").reset();
function deleteAssessment(index) {
// Display a confirmation dialog
var confirmDelete = confirm("Are you sure you want to delete this assessment?");
if (confirmDelete) {
// If the user confirms, delete the assessment
assessments.splice(index, 1);
displayAssessments(); // Update the displayed assessments
displayProfessorInfo(); // Update the displayed Professor Name and Domain
}
// If the user cancels, do nothing
}
}
</script>
<div class="footer">
<div class="copyright">
<p>Copyright © Developed by <a href="../index.htm" target="_blank">Web Weavers</a> 2024</p>
</div>
</div>
</div>
<script src="vendor/global/global.min.js"></script>
<script src="vendor/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
<script src="js/custom.min.js"></script>
<script src="js/dlabnav-init.js"></script>
<script src="vendor/pickadate/picker.js"></script>
<script src="vendor/pickadate/picker.time.js"></script>
<script src="vendor/pickadate/picker.date.js"></script>
<script src="js/plugins-init/pickadate-init.js"></script>
<script src="vendor/svganimation/vivus.min.js"></script>
<script src="vendor/svganimation/svg.animation.js"></script>
<script src="js/styleSwitcher.js"></script>
</body>
</html>