<?php
ob_start();
require_once('operations.php');
session_start();
$db = new Operations();
$db2 = new Operations();
error_reporting(0);


if(isset($_GET['examcode']) && ($_GET['admissionno']) 
&& ($_GET['lname'])  && ($_GET['fname'])   && ($_GET['score'])  ) {
  $examcode =  $_GET['examcode'];
  $admissionno = $_GET['admissionno'];
  
  $lname = $_GET['lname'];
 $fname =  $_GET['fname'];
 $score =  $_GET['score'];
  
  
  
  //$db->findExamsById($param);
  
  // $db2->
  
  
  }

  

  










$statement2 = $db->getExamsAudit($examcode,$admissionno);






 ?>

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="cbt app">
  <meta name="author" content="Creative Tim">
  <title>CBT APP</title>
  <!-- Favicon 
  <link rel="icon" href="../assets/img/brand/favicon.png" type="image/png">
  -->
  <!-- Fonts -->
  <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
  <link rel="stylesheet" href="style.css" type="text/css"> 
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  <link href='https://use.fontawesome.com/releases/v5.7.2/css/all.css'>
  
  <style>

div.sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background-color: yellow;
  padding: 50px;
  font-size: 20px;
}

</style>

</head>

<body style = "background-color:white">

<div id="quiz-time-left" class="sticky"><a href="viewScoresStaff.php" class="btn btn-primary ">Back to Admin</a></div>
<h1>Question</h1>
<h5><strong>Exams Review for <?php  echo " ".$lname." ".$fname. " ".$admissionno."  Score ".$score ?></strong></h5>
<div style="font-weight: bold" id="quiz-time-left"></div>
<!--get the time by lesson id from table exam -->
<?php
 




  
  

?>

<style>
#quiz-time-left{
	color:blue;
	padding:5px;
	font-size:18px;
	
	}
</style>

<div class = "container">
<div class="row">
                    
                    
<div style="overflow-y:auto;"> 



<div  style="color:blue; font:bold; font-size:16; padding:5px;">
<div id="quiz-time-left"></div>
</div>



<?php 

$rowCount1 = 0;
while ($row = $statement2->fetch(PDO::FETCH_ASSOC)){
    extract($row);
$rowCount1++;

 
?> 



<form method="post" name="form" action=""> 
<div align = "left">
<strong>
<?php echo "(" .$rowCount1 .")" ?>  <?php echo $row['question'] ; ?><input type="hidden" name="id[<?php echo $rowCount1 ?>]" value="<?php echo $row['id'];?>" /></strong> </div>
<div class="pt-4" style = "font-size:14px; margin-top:1px">
<label class="options" style = "font-size:14px; margin-top:0px;"> <?php echo "A  ". $row['optionA'] ?><input class="radios" type="radio"   name="choices[<?php echo $rowCount1 ?>]" value="A"/><span class="checkmark"></span> </label><br>
<label class="options" style = "font-size:14px; margin-bottom:0px;"> <?php echo "B ". $row['optionB'] ?><input class="radios" type="radio"   name="choices[<?php echo $rowCount1 ?>]" value="B"/><span class="checkmark"></span> </label> <br> 
<label class="options" style = "font-size:14px; margin-bottom:0px;"> <?php echo "C ".$row['optionC'] ?><input class="radios" type="radio"   name="choices[<?php echo $rowCount1 ?>]" value="C"/><span class="checkmark"></span> </label> <br>
<label class="options" style = "font-size:14px; margin-bottom:0px;"> <?php echo "D ". $row['optionD'] ?><input class="radios" type="radio"  name="choices[<?php echo $rowCount1 ?>]" value="D"/> <span class="checkmark"></span> </label> <br>
<label class="options" style = "font-size:14px; margin-bottom:0px;"> Student's Answer <?php echo " ".$row['studanswer'] ?></label> <br>
<label class="options" style = "font-size:14px; margin-bottom:0px;"> correct  Answer <?php echo " ".$row['answer'] ?></label> <br>

<div>
<?php }  
	 
	 

?>
</div>
<!-- <form action="processscore.php" method="POST" style="margin-top: 100px;text-align: right;"> -->
<div style="margin-top: 10px;text-align: center;">
	
	
    </div>
</form>

<div>
</div>
</body>

</html>