-
Notifications
You must be signed in to change notification settings - Fork 6
/
viewans.php
58 lines (53 loc) · 2.26 KB
/
viewans.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
<?php include 'inc/header.php'; ?>
<?php
Session::checkSession();
$total = $exam->getTotalRows();
?>
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h1 class="mt-5">All Question & Answer - Total <?php echo $total; ?> Questions</h1>
<br/>
<br/></div>
<div class="col-lg-12">
<table>
<?php
$getQues = $exam->getqueData();
if ($getQues) {
while ($question = $getQues->fetch_assoc()) {
?>
<tr>
<td colspan="2">
<h5>Que <?php echo $question['quesNo']." : ".$question['ques']; ?></h5>
</td>
</tr>
<?php
$quesnumber = $question['quesNo'];
$answer = $exam->getAnswer($quesnumber);
if ($answer) {
while ($result = $answer->fetch_assoc()) {
?>
<tr>
<td>
<input type="radio" /><?php
if ($result['rightAns'] == '1') {
echo "<span style='color:green;font-weight: bold;'>".$result['ans']." (Correct Ans)</span>";
}else{
echo $result['ans'];
}
?>
</td>
</tr>
<?php } } ?>
<?php } } ?>
</table>
<a href="starttest.php" class="btn btn-success btn-lg">
<span class="fa fa-arrow-right"></span> Start Exam
</a>
<br/>
<br/>
</div>
</div>
</div>
</div>
<?php include 'inc/footer.php'; ?>