BBnepal-Accounts/application/views/teacher/TF-evaluation-details.php
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

84 lines
3.0 KiB
PHP

<main class="common_margin" id="main">
<div class="main-wrap main-inner-content main-inner-content-new ">
<div class="stud-drade-wrap">
<div class="from-group back_btn mr-2" style="font-size:23px">
<i class="fas fa-long-arrow-alt-left">
</i>
</div>
<h4 class="content-heading-sec">Evaluation</h4>
</div>
<div class="stud-dev-wrap">
<div class="stud-wrap-left">
<?php if (isset($session_results) && $session_results != '') {
foreach ($session_results as $key => $value) {
?>
<div class="stud-row-one">
<h6><?php echo $value['e_name'] .' '. $value['bs_date'] ?></h6>
<input type="button" class="phy-evlauate" value="View" onclick="get_subjects(<?php echo $value['exam_id']; ?>)">
</div>
<?php } } ?>
</div>
<div class="eval-wrap-right">
</div>
</div>
</div>
<script>
$(document).ready(function(){
});
function get_subjects(exam_id)
{
$.ajax({
url: '<?php echo base_url() ?>teacher/get_exam_subject_details/'+exam_id,
type:'POST',
success: function(result) {
let header_one = '';
var res = JSON.parse(result);
console.log(res);
if (res.length=== 0) {
ul_data = '<div class="stud-evalutaion-detail-header">No Data Found</div><ul class="eval-sub"></ul>';
$('.eval-wrap-right').append(ul_data);
}else{
console.log(res.length)
var i = 0;
$.each(res, function(index, value){
// console.log(value['question_id']);
if (i==0) {
ul_data = '<div class="stud-evalutaion-detail-header">'+ value['e_name'] +'</div><ul class="eval-sub"></ul>';
} i++;
header_one +='<li><div class="phy-sec-start"><img src="<?php echo base_url() ?>assets_admin/images/icons/'+ value['subject_icon']+'" class="mx-auto d-block img-fluid"></div><div class="phy-sec-mid"><p>'+ value['subject_name'] +'</p><p>By: '+ value['teacher_name'] +' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Date : '+ value['exam_date'] +'</p> </div><div class="phy-sec-last"><a href="<?php echo base_url() ?>teacher/evaluate-questions/'+ value['question_id'] +'"><input type="button" class="phy-evlauate" value="Evaluate"></a></div></li>';
});
$('.eval-wrap-right').html(ul_data);
$('.eval-sub').html(header_one);
}
}
});
}
$(document).ready(function(){
$('.back_btn').click(function(){
parent.history.back();
return false;
});
});
</script>
</main>