-
Notifications
You must be signed in to change notification settings - Fork 0
/
instructorWisePerformance.php
284 lines (238 loc) · 10.5 KB
/
instructorWisePerformance.php
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
<?php
include 'connect.php';
?>
<!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://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<title>Employee Dashboard</title>
<!--Google Font-->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript"></script>
</head>
<body>
<div class="nav">
<input type="checkbox" id="nav-check">
<div class="nav-header">
<div class="nav-title">
SPMS 3.0
</div>
</div>
<div class="nav-btn">
<label for="nav-check">
<span></span>
<span></span>
<span></span>
</label>
</div>
<div class="nav-links">
<ul>
<li><a href="employee_dashboard.php" target="_self">Dashboard</a></li>
<li><a href="school_department_program_stats.php" target="_self">School/Department/Program-wise</a></li>
<li><a href="courseWisePerformance.php" target="_self">Course-wise</a></li>
<li><a href="instructorWisePerformance.php" target="_self">Instructor-wise</a></li>
<li><a href="instructorWiseChosenCourse.php" target="_self">Instructor-wise(Chosen Course)</a></li>
<li><a href="" target="_self">Dean/Head-wise</a></li>
<li><a href="logout.php" target="_self">Logout</a></li>
</ul>
</div>
</div>
<div class="background">
<!-- div row-1 -->
<div class="row1">
<form method="POST">
<select name="year" class="select">
<option disabled selected>Year</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
<option value="2022">2022</option>
</select>
<input style="background:#00BFFF;
border-radius:10px;
border:none;
outline:none;
color:#fff;
font-size:14px;
letter-spacing:2px;
text-transform:uppercase;
cursor:pointer;
font-weight:bold;
margin-left:5px;
height: 36px;
width: 100px;"
type="submit" name="submitInstructorName" value="Submit"/>
</div>
<!-- div row-2 -->
<div
style="height:50px;display:flex;justify-content:space-around;">
<select name="courseInstructor1" class="select"
style="margin-left:0px;width:250px;height:100%;margin-top:0px;">
<option disabled selected>Course Instructor</option>
<option value="4275">Tahsin F.Ara Nayna</option>
<option value="4361">Shovasis Kumar Biswas</option>
<option value="4351">Nabila Rahman Nodi</option>
<option value="2518">Mubash-Shera Karishma Mobarok</option>
<option value="2344">Nadira Sultana Mirza</option>
<option value="2259">Mainuddin Chowdhury</option>
<option value="2483">Kazi Mubinul Hasan Shanto</option>
<option value="4449">Sheikh Abujar</option>
<option value="3329">Abul Khair jyote</option>
</select>
<select name="courseInstructor2" class="select"
style="margin-left:0px;width:250px;height:100%;margin-top:0px;">
<option disabled selected>Course Instructor</option>
<option value="4275">Tahsin F.Ara Nayna</option>
<option value="4361">Shovasis Kumar Biswas</option>
<option value="4351">Nabila Rahman Nodi</option>
<option value="2518">Mubash-Shera Karishma Mobarok</option>
<option value="2344">Nadira Sultana Mirza</option>
<option value="2259">Mainuddin Chowdhury</option>
<option value="2483">Kazi Mubinul Hasan Shanto</option>
<option value="4449">Sheikh Abujar</option>
<option value="3329">Abul Khair jyote</option>
</select>
<select name="courseInstructor3" class="select"
style="margin-left:0px;width:250px;height:100%;margin-top:0px;">
<option disabled selected>Course Instructor</option>
<option value="4275">Tahsin F.Ara Nayna</option>
<option value="4361">Shovasis Kumar Biswas</option>
<option value="4351">Nabila Rahman Nodi</option>
<option value="2518">Mubash-Shera Karishma Mobarok</option>
<option value="2344">Nadira Sultana Mirza</option>
<option value="2259">Mainuddin Chowdhury</option>
<option value="2483">Kazi Mubinul Hasan Shanto</option>
<option value="4449">Sheikh Abujar</option>
<option value="3329">Abul Khair jyote</option>
</select>
</form>
</div>
<div style="height:50px;padding-left:43%;margin-top:15px;">
<button onclick="viewInstructorWise()" style="height: 46px;width: 100px;margin-left:50px;display:inline-block; border-radius: 10px; border: none;outline: none;background:#00BFFF;color: #fff;font-size: 14px;letter-spacing:2px;text-transform: uppercase;cursor:pointer;font-weight: bold;">
view</button>
</div>
<div class="row3" style="margin-top:5px;">
<div id="Spring" style="width: 500px; height: 500px; display:inline-block;"></div>
<div id="Summer" style="width: 500px; height: 500px; display:inline-block;"></div>
<div id="Autumn" style="width: 500px; height: 500px; display:inline-block;"></div>
</div>
</div>
<?php
if(isset($_POST['submitInstructorName'])){
$year=$_POST['year'];
$instructor1=$_POST['courseInstructor1'];
$instructor2=$_POST['courseInstructor2'];
$instructor3=$_POST['courseInstructor3'];
}?>
<!-- chosen instructor wise function -->
<script>
function viewInstructorWise(){
<?php
$sql="SELECT e.firstName AS firstName,e.lastName AS lastName, AVG(scp.gradePoint) AS GPA
FROM student_course_performance_t AS scp,section_t AS sec, registration_t AS r,
employee_t AS e
WHERE scp.registrationID=r.registrationID AND r.sectionID=sec.sectionID
AND sec.facultyID=e.employeeID AND sec.year='$year' AND sec.semester='autumn'
AND sec.facultyID IN ('$instructor1','$instructor2','$instructor3')
GROUP BY sec.facultyID";
$result=mysqli_query($con,$sql);
?>
google.charts.load('current', {'packages':['bar']});
google.charts.setOnLoadCallback(drawAutumnChart);
google.charts.setOnLoadCallback(drawSummerChart);
google.charts.setOnLoadCallback(drawSpringChart);
function drawAutumnChart() {
var data = google.visualization.arrayToDataTable([
['Course Instructor','GPA'],
<?php
while($data=mysqli_fetch_array($result)){
$courseInstructor=$data['firstName']." ".$data['lastName'];
$GPA=$data['GPA'];
?>
['<?php echo $courseInstructor;?>',<?php echo $GPA;?>],
<?php
}
?>
]);
var options = {
chart: {
title: 'Autumn',
},
bars: 'vertical' // Required for Material Bar Charts.
};
var chart = new google.charts.Bar(document.getElementById('Autumn'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
<?php
$sql="SELECT e.firstName AS firstName,e.lastName AS lastName, AVG(scp.gradePoint) AS GPA
FROM student_course_performance_t AS scp,section_t AS sec, registration_t AS r,
employee_t AS e
WHERE scp.registrationID=r.registrationID AND r.sectionID=sec.sectionID
AND sec.facultyID=e.employeeID AND sec.year='$year' AND sec.semester='summer'
AND sec.facultyID IN ('$instructor1','$instructor2','$instructor3')
GROUP BY sec.facultyID";
$result=mysqli_query($con,$sql);
?>
function drawSummerChart() {
var data = google.visualization.arrayToDataTable([
['Course Instructor','GPA'],
<?php
while($data=mysqli_fetch_array($result)){
$courseInstructor=$data['firstName']." ".$data['lastName'];
$GPA=$data['GPA'];
?>
['<?php echo $courseInstructor;?>',<?php echo $GPA;?>],
<?php
}
?>
]);
var options = {
chart: {
title: 'Summer',
},
bars: 'vertical' // Required for Material Bar Charts.
};
var chart = new google.charts.Bar(document.getElementById('Summer'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
<?php
$sql="SELECT e.firstName AS firstName,e.lastName AS lastName, AVG(scp.gradePoint) AS GPA
FROM student_course_performance_t AS scp,section_t AS sec, registration_t AS r,
employee_t AS e
WHERE scp.registrationID=r.registrationID AND r.sectionID=sec.sectionID
AND sec.facultyID=e.employeeID AND sec.year='$year' AND sec.semester='spring'
AND sec.facultyID IN ('$instructor1','$instructor2','$instructor3')
GROUP BY sec.facultyID";
$result=mysqli_query($con,$sql);
?>
function drawSpringChart() {
var data = google.visualization.arrayToDataTable([
['Course Instructor','GPA'],
<?php
while($data=mysqli_fetch_array($result)){
$courseInstructor=$data['firstName']." ".$data['lastName'];
$GPA=$data['GPA'];
?>
['<?php echo $courseInstructor;?>',<?php echo $GPA;?>],
<?php
}
?>
]);
var options = {
chart: {
title: 'Spring',
},
bars: 'vertical' // Required for Material Bar Charts.
};
var chart = new google.charts.Bar(document.getElementById('Spring'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
}
</script>
</body>
</html>