-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.php
86 lines (77 loc) · 2.95 KB
/
report.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
<?php
$quesArray = array();
$subQuesArray = array();
$COArray = array();
$resultCO;
$fileDir = "C:\\xampp\\htdocs\\www\\WebPage\\UsersData\\admin\\Makeup.xls\\";
collectData($fileDir,$quesArray,$subQuesArray,$COArray,$resultCO);
function collectData($fileDir,&$quesArray,&$subQuesArray,&$COArray,&$resultCO) {
if (($handle = fopen($fileDir."processed_data.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, ",")) !== FALSE) {
array_push($quesArray,$data[4]);
array_push($subQuesArray,$data[5]);
}
fclose($handle);
}
if (($handle = fopen($fileDir."analysed_CO.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, ",")) !== FALSE) {
array_push($COArray,$data[0]);
}
fclose($handle);
}
if (($handle = fopen($fileDir."result_cowise.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, ",")) !== FALSE) {
$resultCO = $data[0];
}
fclose($handle);
}
}
?>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 5px;
text-align: left;
}
</style>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="col-md-8 col-md-offset-1">
<div class="panel panel-primary">
<div class="panel-heading"><h3>Analysis by Course Outcomes</h3></div>
<div class="panel-body">
<table class="table table-bordered">
<tr>
<th >Ques No.</th>
<th >Sub Ques No.</th>
<th >Grade</th>
</tr>
<?php
$totalData = count($quesArray);
for($i=0; $i<$totalData; $i++) {
?>
<tr>
<td><?php echo $quesArray[$i];?></td>
<td><?php echo $subQuesArray[$i];?></td>
<td><?php echo $COArray[$i];?></td>
</tr>
<?php } ?>
</table>
</div>
<div class="panel-footer"><h4>Average Quality of Question Paper is = <?php echo $resultCO; ?></h4></div>
</div>
</div>
</div>
</body>
</html>