Current File : /home/inlingua/www/sensoriumpsychologists.com/backup/student/assignment_result.php |
<?php
include_once("common/head_links.php");
include_once("../classes/config.php");
?>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<?php include_once("common/header.php");?>
<?php include_once("common/left_side_bar.php");?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
</h1>
</section>
<!-- Main content -->
<section class="content">
<?php
$id=$session_row['student_id'];
$result=$query->select_where_field('shristi_assignment_result','user_id',$id,"AND status !=''"); ?>
<!-- Info boxes -->
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10 col-sm-8 col-xs-8">
<table class="student table table-striped">
<tr>
<td colspan="11"> <h1>Assignment Results</h1></td></tr>
<tr >
<th>Assignment</th>
<th>Attempt</th>
<th>Total Question</th>
<th>Right Answers</th>
<th>Wrong Answers</th>
<th>Total Marks</th>
<th>Total %</th>
</tr>
<?php
$assignment1=1;
$assignment2=1;
$assignment3=1;
$assignment4=1;
$assignment5=1;
$assignment6=1;
while ($row=$result->fetch_assoc()){
$assignment_id = $row['assignment_id'];
$right_answer = $row['right_answer'];
$wrong_answer = $row['wrong_answer'];
$total_marks = $row['right_answer'];
?>
<tr >
<td>
<?php
$results=$query->select_where('shristi_assignment_list','id',$row['assignment_id']);
$frow=$results->fetch_assoc();
echo $frow['name']; ?>
</td>
<td>
<?php
if($assignment_id==1)
{
echo $assignment1++;
if($assignment1>3)
{
echo ' Attempt / Paid';
}else {
echo ' Attempt / Free';
}
}
else if($assignment_id==2)
{
echo $assignment2++;
if($assignment2>3)
{
echo ' Attempt / Paid';
}else {
echo ' Attempt / Free';
}
}
else if($assignment_id==3)
{
echo $assignment3++;
if($assignment3>3)
{
echo ' Attempt / Paid';
}else {
echo ' Attempt / Free';
}
}
else if($assignment_id==4)
{
echo $assignment4++;
if($assignment4>3)
{
echo ' Attempt / Paid';
}else {
echo ' Attempt / Free';
}
}
else if($assignment_id==5)
{
echo $assignment5++;
if($assignment5>3)
{
echo ' Attempt / Paid';
}else {
echo ' Attempt / Free';
}
}
else if($assignment_id==6)
{
echo $assignment6++;
if($assignment6>3)
{
echo ' Attempt / Paid';
}else {
echo ' Attempt / Free';
}
} ?>
</td>
<td>
<?php
//$results12=$query->select_where_field('shristi_assignment','assignment_id',$row['assignment_id'],"AND status='1'");
echo $arow=10;
?>
</td>
<td><?php echo $right_answer; ?></td>
<td><?php echo $wrong_answer; ?></td>
<td><?php echo $total_marks; ?></td>
<td>
<?php
if($total_marks==0){echo "Enable To get Your %";}
else{ $new_width = ($right_answer/ $arow ) * 100;
if($new_width<50){
echo "<p class='btn btn-danger' style='color:black;'>$new_width</p>";
}else{echo "<p class='btn btn-success' style='color:green;'>$new_width</p>";}
}
?>
</td>
</tr>
<?php } ?>
</table>
</div>
</div>
</section>
</div>
<?php include_once("common/footer.php");?>
</div><!-- ./wrapper -->
<?php include_once("common/footer_links.php");?>
</body>
</html>