%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<style>
@media print {
.navbar{
display:none;
}
#footer{
display:none;
}
.printbtn{
display:none;
}
#social_share{
display:none;
}
#page_break2{
page-break-after: always;
}
}
td{
font-size:14px;
padding:4px;
}
</style>
<div class="main-wapper-inner">
<!-- /.row -->
<div class="home-inners">
<div class="container-fluid">
<?php
$logged_in=$this->session->userdata('logged_in');
?>
<div class="print-btn" style="position:absolute; top:-63px; right:0px;">
<a style="float:right; margin:20px 0 0 0;" href="javascript:print();" class="btn btn-success printbtn"><?php echo $this->lang->line('print');?></a>
<?php
if($result['gen_certificate']=='1'){
?>
<a style="float:right; margin:20px 0 0 0;" href="<?php echo site_url('result/generate_certificate/'.$result['rid']);?>" class="btn btn-warning printbtn"><?php echo $this->lang->line('download_certificate');?></a>
<?php
}
?>
</div>
<div class="row">
<?php
if($this->session->flashdata('message')){
echo $this->session->flashdata('message');
}
$logged_in=$this->session->userdata('logged_in');
$outer_logo_image = $this->session->userdata('outer_logo_image');
$logo_nimage = $this->session->userdata('logo_image');
$logo_image = $outer_logo_image !='' ? $outer_logo_image : $logo_nimage;
?>
<div class="clearfix" style="clear:both;margin:0 0 10px 0;"></div>
<!--<div class="col-md-12" align="center"><img src="<?=base_url($logo_image) ?>" height="70px;"></div>-->
<div class="col-md-12">
<?php if($logged_in['su']>='1') { ?>
<h3 style="margin:0 0 20px 0; clear:both;">Personal Details</h3>
<div class="table-responsice">
<table class="table table-bordered print-view">
<tr>
<th><?php echo $this->lang->line('full_first_name');?></th>
<th><?php echo $this->lang->line('email');?></th>
<th><?php echo $this->lang->line('contact_no');?></th>
<th><?php echo $this->lang->line('system_id');?></th>
<th><?php echo $this->lang->line('group_name');?></th>
<!--<th><?php echo $this->lang->line('address');?></th>-->
<th><?php echo $this->lang->line('school_name');?></th>
</tr>
<tr>
<td><?php echo $result['first_name'].' '.$result['last_name'];?></td>
<td><?php echo $result['user_email'];?></td>
<td><?php echo $result['contact_no'];?></td>
<td><?php echo $result['system_id'];?></td>
<td><?php echo $result['group_name'];?></td>
<!--<td><?php echo $result['address'];?></td>-->
<td><?php echo $result['school_name'];?></td>
</tr>
</table>
</div>
<?php } ?>
<h3 style="margin:0 0 20px 0;"> <?php echo $result['quiz_name'];?> <?php echo $title;?></h3>
<?php
if($result['show_result']=='1' || $logged_in['su']>='1' || (in_array('5',explode(',',$logged_in['role_id'])))){
?>
<div class="table-responsice">
<ul class="view-result-list">
<li><div class="iconsa"><i class="fa fa-question" aria-hidden="true"></i></div>
<strong><?php echo $this->lang->line('qus_attempt');?></strong>
<?php echo $result['maximum_questions']; ?>
</li>
<li><div class="iconsa"><i class="fa fa-question" aria-hidden="true"></i></div>
<strong><?php echo $this->lang->line('attempt_questions');?></strong>
<?php $score_individual = explode(',',$result['score_individual']); $quesAttempt = array();$quesNotAttempt = array(); foreach($score_individual as $val) { if($val>0){ $quesAttempt[] = $val; } else { $quesNotAttempt[] = $val;} } ?> <?php echo count($quesAttempt); ?></b>
</li>
<li><div class="iconsa"><i class="fa fa-percent" aria-hidden="true"></i></div>
<strong><?php echo $this->lang->line('percentage_obtained');?></strong>
<?php echo round($result['percentage_obtained'],2);?>%
</li>
<?php if($logged_in['su']>='1'){ ?>
<li><div class="iconsa"><i class="fa fa-clock-o" aria-hidden="true"></i></div>
<strong><?php echo $this->lang->line('your_time_spent');?></strong>
<?php
$seconds = $result['total_time'];
$minutes = floor($seconds/60);
$secondsleft = $seconds%60;
if($minutes<10)
$minutes = "0" . $minutes;
if($secondsleft<10)
$secondsleft = "0" . $secondsleft;
echo "$minutes:$secondsleft"; ?> Min / <?php echo $result['duration'];?> Min</li>
<?php } ?>
<li><div class="iconsa"><i class="fa fa-check" aria-hidden="true"></i></div>
<strong> <?php echo $this->lang->line('status');?></strong>
<?php echo $result['result_status'];?>
</li>
<?php if($logged_in['su']>='1'){ ?>
<li><div class="iconsa"><i class="fa fa-clock-o" aria-hidden="true"></i></div>
<strong>Quiz Start Time</strong>
<?php echo date('d M, Y H:i:s',$result['start_time']);?>
</li>
<li><div class="iconsa"><i class="fa fa-clock-o" aria-hidden="true"></i></div>
<strong>Quiz End Time</strong>
<?php echo date('d M, Y H:i:s',$result['end_time']);?>
</li>
<li><div class="iconsa"><i class="fa fa-question" aria-hidden="true"></i></div>
<strong><?php echo $this->lang->line('correct_qus');?></strong>
<?php echo abs($result['score_obtained']/$result['correct_score']); ?>
</li>
<?php } ?>
</ul>
<!--<table class="table table-bordered print-view">
<tr>
<th></th>
<th></th>
<?php if($logged_in['su']>='1' || (in_array('5',explode(',',$logged_in['role_id'])))){ ?>
<th><?php echo $this->lang->line('your_time_spent');?></th>
<?php } ?>
<th></th>
</tr>
<tr>
<td>
</td>
<td></td>
<td>
</td>
</tr>
</table>-->
</div>
<?php } else { ?>
<p><strong>Thank you for your submission.</strong></p>
<?php } ?>
<!-- <h3 style="margin:0 0 20px 0;"><?php echo $title;?></h3>
<ul class="quiz-progress">
<li style="font-size:20px;">
<p><?php echo $this->lang->line('quiz_name');?></p>
<b><?php echo $result['quiz_name'];?></b>
</li>
<li class="<?php if(trim($result['result_status'])=='Pass'){?>class-pass<?php } else { ?>class-fail <?php } ?>">
<b style="color:white;"><?php echo $result['result_status'];?></b>
<p><?php echo $this->lang->line('status');?></p>
</li>
<li>
<b>
<?php
$seconds = $result['total_time'];
$minutes = floor($seconds/60);
$secondsleft = $seconds%60;
if($minutes<10)
$minutes = "0" . $minutes;
if($secondsleft<10)
$secondsleft = "0" . $secondsleft;
echo "$minutes:$secondsleft"; ?> Min</b>
<p><?php echo $this->lang->line('your_time_spent');?></p>
</li>
<li>
<b><?php echo $result['score_obtained'];?></b>
<p><?php echo $this->lang->line('score_obtained');?></p>
</li>
<li>
<b><?php echo abs($result['score_obtained']/$result['correct_score']);?></b>
<p><?php echo $this->lang->line('correct_qus');?></p>
</li>
<li>
<b><?php $score_individual = explode(',',$result['score_individual']); $quesAttempt = array();$quesNotAttempt = array(); foreach($score_individual as $val) { if($val>0){ $quesAttempt[] = $val; } else { $quesNotAttempt[] = $val;} } ?> <?php echo count($quesAttempt); ?></b>
<p><?php echo $this->lang->line('attempt_questions');?></p>
</li>
<li>
<b><?php echo $result['maximum_questions']; ?></b>
<p><?php echo $this->lang->line('qus_attempt');?></p>
</li>
<li>
<b><?php echo date('d M, Y H:i:s',$result['start_time']);?></b>
<p><?php echo $this->lang->line('attempt_time');?></p>
</li>
</ul>
</div>
<div class="col-md-4">
<h3 style="margin:0 0 20px 0; clear:both;">Personal Details</h3>
<table class="table table-bordered print-view">
<?php
if($result['camera_req']=='1'){
?>
<tr><td colspan='2'> <?php if($result['photo']!=''){ ?> <img src ="<?php echo base_url('photo/'.$result['photo']);?>" id="photograph" ><?php } ?></td></tr>
<?php
}
?>
<tr>
<td width="35%"><?php echo $this->lang->line('full_first_name');?></td>
<td><?php echo $result['first_name'].' '.$result['last_name'];?></td>
</tr>
<tr>
<td><?php echo $this->lang->line('email');?></td>
<td><?php echo $result['user_email'];?></td>
</tr>
<tr>
<td><?php echo $this->lang->line('contact_no');?></td>
<td><?php echo $result['contact_no'];?></td>
</tr>
<tr>
<td><?php echo $this->lang->line('level_name');?></td>
<td><?php echo $result['class_level'];?></td>
</tr>
<tr>
<td><?php echo $this->lang->line('subject');?></td>
<td><?php echo $result['subject'];?></td>
</tr><tr>
<td><?php echo $this->lang->line('address');?></td>
<td><?php echo $result['address'];?></td>
</tr><td><?php echo $this->lang->line('school_name');?></td>
<td><?php echo $result['school_name'];?></td>
</tr>
<?php //print_r($result); die;?>
</table>
</div>
</div>-->
<div class="clearfix" style="clear:both;"></div>
<div style="text-align:center;"><a href="<?php echo site_url('result');?>" class="btn btn-warning"><?php echo $this->lang->line('back');?></a></div>
</div>
</div></div></div>
</div>
<!-- /.row -->
<?php
if($this->config->item('google_chart') == true && $logged_in['su']>='1'){
?>
<div class="main-wapper-inner">
<!-- /.row -->
<div class="home-inners">
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
<!-- google chart starts -->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable(<?php echo $value;?>);
var options = {
title: '<?php echo $this->lang->line('top_10_result');?> <?php echo $result['quiz_name'];?>',
hAxis: {title: '<?php echo $this->lang->line('quiz');?>(<?php echo $this->lang->line('user');?>)', titleTextStyle: {color: 'red'}}
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
<div id="chart_div" style="width: 800px; height: 500px;"></div>
<!-- google chart ends -->
</div>
<div class="col-md-6">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<!-- google chart starts -->
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable(<?php echo $qtime;?>);
var options = {
title: '<?php echo $this->lang->line('time_spent_on_ind');?>'
};
var chart = new google.visualization.PieChart(document.getElementById('chart_div2'));
chart.draw(data, options);
}
</script>
<div id="chart_div2" style="width:auto; height: 500px;"></div>
<!-- google chart ends -->
</div></div>
</div></div></div>
<?php
}
$logged_in=$this->session->userdata('logged_in');
$ind_score=explode(',',$result['score_individual']);
// view answer
$display_result_answer = 'N';
if($logged_in['su']>='1') {
$display_result_answer = 'Y';
} else if($result['view_answer']=='1'){
$display_result_answer = 'Y';
} else if(in_array('5',explode(',',$logged_in['role_id']))){
$display_result_answer = 'Y';
}
if($display_result_answer=='Y') {
?>
<?php if(count($questions)>0) {?>
<div class="main-wapper-inner main-wapper-inner1">
<div class="top-menus">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3><?php echo $this->lang->line('answer_sheet');?></h3>
</div><!-- /input-group -->
</div>
</div><!-- /.col-lg-6 -->
</div>
<div class="home-inners">
<div class="container-fluid">
<div class="row">
<div class="col-md-9">
<div class="view-resalst">
<?php
$abc=array(
'0'=>'A',
'1'=>'B',
'2'=>'C',
'3'=>'D',
'4'=>'E',
'6'=>'F',
'7'=>'G',
'8'=>'H',
'9'=>'I',
'10'=>'J',
'11'=>'K'
);
$rcArray = array();
foreach($questions as $qk => $ques){ $rcArray[$ques['rc_qid']][] = $ques['rc_qid']; }
$qt=0;
$rcarrayType = array();
$av = 0;
foreach($questions as $qk => $question){
?>
<div id="q<?php echo $qk;?>" class="results-inner" style="<?php if($ind_score[$qk]=='1'){ ?>background-color:#e3f8da;<?php }else if($ind_score[$qk]=='2'){ ?>background-color:#ffe1cb;<?php }else if($ind_score[$qk]=='3'){ ?>background-color:#fdfbcf;<?php }else{ ?>background-color:#ffffff;<?php } ?>">
<div class="q-1" >
<?php
if($question['rc_qid']>0) {
if($qt==0){
$totalQus = count($rcArray[$question['rc_qid']]);
$quesStart = $qk+1;
$endPoint = $qk+$totalQus;
$rcarrayType[] = $question['rc_qid'];
}
if(!in_array($question['rc_qid'],$rcarrayType)){
$qt=0;
$totalQus = count($rcArray[$question['rc_qid']]);
$quesStart = $qk+1;
$endPoint = $qk+$totalQus;
$rcarrayType[$av] = $question['rc_qid'];
$av++;
}
if($qt==0){
?>
<div>
<h4><?php echo $this->lang->line('direction');?> <?php if($quesStart>0 && $endPoint>0 && ($quesStart<>$endPoint)){?><small>(Que No <?php echo $quesStart; ?>-<?php echo $endPoint; ?>)</small><?php }?></h4>
<div class="question_container" >
<?php echo getrcqiddetails($question['rc_qid']);?>
</div>
</div>
<?php } $qt++; } ?>
<?php echo '<b>'.$this->lang->line('question');?> <?php echo $qk+1;?>)</b>
<p><?php echo $question['question'];?></p>
<?php if($question['description']!='' && strtolower($question['description'])!='na') {
//echo '<b>'.$this->lang->line('description').'</b>';
//echo $question['description'];
}
?>
<div class="clearfix"></div>
</div>
<div class="div-view-in" >
<?php
// multiple single choice
if($question['question_type']==$this->lang->line('multiple_choice_single_answer')){
$save_ans=array();
foreach($saved_answers as $svk => $saved_answer){
if($question['qid']==$saved_answer['qid']){
$save_ans[]=$saved_answer['q_option'];
}
}
?>
<input type="hidden" name="question_type[]" id="q_type<?php echo $qk;?>" value="1">
<?php
$i=0;
$correct_options=array();
foreach($options as $ok => $option){
if($option['qid']==$question['qid']){
if($option['score'] >= 0.1){
$correct_options[]=$option['q_option'];
}
?>
<div class="op"><?php echo $abc[$i];?>) <input type="radio" name="answer[<?php echo $qk;?>][]" id="answer_value<?php echo $qk.'-'.$i;?>" value="<?php echo $option['oid'];?>" <?php if(in_array($option['oid'],$save_ans)){ echo 'checked'; } ?> > <?php echo $option['q_option'];?> </div>
<?php
$i+=1;
}else{
$i=0;
}
} ?>
<div class='correct-options'>
<?php echo $this->lang->line('correct_answer').': '.implode(', ',$correct_options); ?>
</div>
<?php
}
// multiple_choice_multiple_answer
if($question['question_type']==$this->lang->line('multiple_choice_multiple_answer')){
$save_ans=array();
foreach($saved_answers as $svk => $saved_answer){
if($question['qid']==$saved_answer['qid']){
$save_ans[]=$saved_answer['q_option'];
}
}
?>
<input type="hidden" name="question_type[]" id="q_type<?php echo $qk;?>" value="2">
<?php
$i=0;
$correct_options=array();
foreach($options as $ok => $option){
if($option['qid']==$question['qid']){
if($option['score'] >= 0.1){
$correct_options[]=$option['q_option'];
}
?>
<div class="op"><?php echo $abc[$i];?>) <input type="checkbox" name="answer[<?php echo $qk;?>][]" id="answer_value<?php echo $qk.'-'.$i;?>" value="<?php echo $option['oid'];?>" <?php if(in_array($option['oid'],$save_ans)){ echo 'checked'; } ?> > <?php echo $option['q_option'];?> </div>
<?php
$i+=1;
}else{
$i=0;
}
}
echo "<br>".$this->lang->line('correct_options').': '.implode(', ',$correct_options);
}
// short answer
if($question['question_type']==$this->lang->line('short_answer')){
$save_ans="";
foreach($saved_answers as $svk => $saved_answer){
if($question['qid']==$saved_answer['qid']){
$save_ans=$saved_answer['q_option'];
}
}
?>
<input type="hidden" name="question_type[]" id="q_type<?php echo $qk;?>" value="3" >
<?php
?>
<div class="op">
<?php echo $this->lang->line('your_answer');?>
<input type="text" name="answer[<?php echo $qk;?>][]" value="<?php echo $save_ans;?>" id="answer_value<?php echo $qk;?>" >
</div>
<?php
foreach($options as $ok => $option){
if($option['qid']==$question['qid']){
echo "<br>".$this->lang->line('correct_answer').': '.$option['q_option'];
}
}
}
// long answer
if($question['question_type']==$this->lang->line('long_answer')){
$save_ans="";
foreach($saved_answers as $svk => $saved_answer){
if($question['qid']==$saved_answer['qid']){
$save_ans=$saved_answer['q_option'];
}
}
?>
<input type="hidden" name="question_type[]" id="q_type<?php echo $qk;?>" value="4">
<?php
?>
<div class="op">
<?php echo $this->lang->line('answer');?> <br>
<?php echo $this->lang->line('word_counts');?> <?php echo str_word_count($save_ans);?>
<textarea name="answer[<?php echo $qk;?>][]" id="answer_value<?php echo $qk;?>" style="width: 874px; height: 349px;" onKeyup="count_char(this.value,'char_count<?php echo $qk;?>');" readonly><?php echo $save_ans;?></textarea>
</div>
<?php
if($logged_in['su']>='1'){
if($ind_score[$qk]=='3'){
?>
<div id="assign_score<?php echo $qk;?>">
<?php echo $this->lang->line('evaluate');?>
<a href="javascript:assign_score('<?php echo $result['rid'];?>','<?php echo $qk;?>','1');" class="btn btn-success" ><?php echo $this->lang->line('correct');?></a>
<a href="javascript:assign_score('<?php echo $result['rid'];?>','<?php echo $qk;?>','2');" class="btn btn-danger" ><?php echo $this->lang->line('incorrect');?></a>
</div>
<?php
}
}
?>
<?php
}
// matching
if($question['question_type']==$this->lang->line('match_the_column')){
$save_ans=array();
foreach($saved_answers as $svk => $saved_answer){
if($question['qid']==$saved_answer['qid']){
// $exp_match=explode('__',$saved_answer['q_option_match']);
$save_ans[]=$saved_answer['q_option'];
}
}
?>
<input type="hidden" name="question_type[]" id="q_type<?php echo $qk;?>" value="5">
<?php
$i=0;
$match_1=array();
$match_2=array();
foreach($options as $ok => $option){
if($option['qid']==$question['qid']){
$match_1[]=$option['q_option'];
$match_2[]=$option['q_option_match'];
?>
<?php
$i+=1;
}else{
$i=0;
}
}
?>
<div class="op">
<table>
<tr><td></td><td><?php echo $this->lang->line('your_answer');?></td><td><?php echo $this->lang->line('correct_answer');?></td></tr>
<?php
foreach($match_1 as $mk1 =>$mval){
?>
<tr><td>
<?php echo $abc[$mk1];?>) <?php echo $mval;?>
</td>
<td>
<select name="answer[<?php echo $qk;?>][]" id="answer_value<?php echo $qk.'-'.$mk1;?>" >
<option value="0"><?php echo $this->lang->line('select');?></option>
<?php
foreach($match_2 as $mk2 =>$mval2){
?>
<option value="<?php echo $mval.'___'.$mval2;?>" <?php $m1=$mval.'___'.$mval2; if(in_array($m1,$save_ans)){ echo 'selected'; } ?> ><?php echo $mval2;?></option>
<?php
}
?>
</select>
</td>
<td>
<div class="correct-options">
<?php
echo $match_2[$mk1];
?>
</div>
</td>
</tr>
<?php
}
?>
</table>
</div>
<div class="clearfix"></div>
<?php
}
?>
</div>
</div>
<div id="page_break"></div>
<?php
}
?>
</div>
</div>
</div>
<?php
} }
// view answer ends
?>
<?php
if($result['view_answer']=='1' || $logged_in['su']>='1' || (in_array('5',explode(',',$logged_in['role_id'])))){
if($result['camera_req']=='1' && $logged_in['su']>='1'){
$dirname = "photo/".$rid."/";
$images = glob($dirname."*.jpg");
?>
<div class="col-md-3">
<h3><?php echo $this->lang->line('captured_photo');?></h3>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<?php if(count($images)>0) { ?>
<ol class="carousel-indicators">
<?php
$k=0;
foreach($images as $image) { ?>
<li data-target="#myCarousel" data-slide-to="<?=$k?>" <?php if($k==0) { ?>class="active" <?php } ?>></li>
<?php $k++; } ?>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" >
<?php
$k=0;
foreach($images as $image) { ?>
<div class="item <?php if($k==0){ ?>active <?php }?>" >
<img src="<?=base_url($image)?>" alt="Los Angeles" style="width:100%;">
</div>
<?php $k++; } ?>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
<?php } else { echo '<p>No Image Found!!!!</p>'; }?>
</div>
</div>
<?php
} ?>
<?php
}
?>
<input type="hidden" id="evaluate_warning" value="<?php echo $this->lang->line('evaluate_warning');?>">
</div>
<div class="clearfix" style="clear:both;"></div>
</div>
</div>
</div>