BBnepal-Accounts/application/views/admin/getstudentsresults.php

221 lines
11 KiB
PHP
Raw Normal View History

2024-07-10 12:43:19 +00:00
<style>
form label.error, #secNameerr {
color : red;
}
.filter-reset {
margin-top: 20px !important;
position: absolute;
}
.cierr {
font-size:14px;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<!-- <div class="subsec_sec"> -->
<!-- <div class="subject_l subject_l_full_width"> -->
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<form action="<?php echo base_url() ?>admin/results" method="post" id="sectionForm">
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label for="">Batch <span class="text-danger font-weight-bold">*</span></label>
<select name="search_batch" id="search_batch" class="form-control">
<option value=""> -- Select Batch -- </option>
<?php
if(!empty($batchlist)):
foreach($batchlist as $batch):
// $batch_date = date('M-Y', $d_f) . ' To ' . date('M-Y', $d_f);
$batch_date = batchdateFormat($batch['b_from'],$batch['b_end']);
?>
<option value="<?= $batch['id'];?>" <?php echo set_select('search_batch', $batch['id'],( !empty($batchid) ? TRUE : FALSE )); ?> ><?= $batch_date;?></option>
<?php endforeach;
endif;
?>
</select>
<div class="text-danger cierr"><?php echo form_error('search_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for=""> Course <span class="text-danger font-weight-bold">*</span></label>
<select name="search_course" id="search_course" class="form-control">
<option value=""> -- Select Course -- </option>
<?php
if(!empty($courselist)):
foreach($courselist as $course):
// $classroomId=(!empty($classroomid)) ? $classroomid:0;
// if():
// else:
?>
<option value="<?= $course['id'];?>" <?php echo set_select('search_course', $course['id'],( !empty($courseId) ? TRUE : FALSE )); ?>><?= $course['course_name'];?></option>
<?php endforeach;
endif;
?>
</select>
<div class="text-danger cierr"><?php echo form_error('search_course'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="">Exam <span class="text-danger font-weight-bold">*</span></label>
<select name="search_exam" id="search_exam" class="form-control">
<option value=""> -- Select Exam -- </option>
<?php
if(!empty($examlist)):
foreach($examlist as $exam): ?>
<option value="<?= $exam['id'];?>" <?php echo set_select('search_exam', $exam['id'],( !empty($examid) ? TRUE : FALSE )); ?>><?= $exam['e_name'];?></option>
<?php endforeach;
endif;
?>
</select>
<div class="text-danger cierr"><?php echo form_error('search_exam'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="filter-reset">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/getstudentsresults"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="applicnts-list-wrap mt-5">
<div class="">
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Student Name</th>
<th>Classroom </th>
<th>Exam</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i = 1;
if(!empty($studentlist)){
// dd($studentlist);
foreach ($studentlist as $student) {
?>
<tr>
<td><?= $i ?></td>
<td><?= $student['name']; ?></td>
<td><?= $student['course_name']; ?></td>
<td><?= $student['exam_name']; ?></td>
<td>
<!-- <span title="View" data-toggle="modal" data-target="#viewAssignment"> -->
<span title="View" onclick="getmarkscardDetails(<?= $student['studid']; ?>,<?= $student['examid']; ?>,<?= $student['course'];?>)">
<i class="fa fa-eye" aria-hidden="true"></i>
</span>
<a href="<?php echo base_url(); ?>admin/downloadMarkscard/<?php echo $student['studid']; ?>/<?= $student['examid']; ?>/<?= $student['course'];?>" title="View" class="pl-2">
<i class="fa fa-download" aria-hidden="true"></i>
</a>
</td>
</tr>
<?php $i++;
} }
?>
</tbody>
</table>
</div>
</div>
<!-- </div> -->
<!-- </div> -->
</div>
</div>
</div>
<!----admin template section end---->
<div class="modal fade syllabus-modal assignment-modal mark-sheet-modal" id="viewAssignment" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="marksheetWrap">
<div class="marksheet">
</div>
</div>
</div>
</div>
</div>
</main>
<!--End right-top side-->
<script>
$(document).ready(function(){
$('#tbl').DataTable({
"lengthMenu": [
[ 25, 50,75,100, -1],
[ 25, 50,75,100, "All"]
],
});
});
function getmarkscardDetails(studentId,examId,courseId){
if(studentId !='' && examId != '' && courseId!='' ){
// console.log(studentId+'-'+studentBatchId+'-'+examId);
// alert(studentId);
$.ajax({
url:"<?= base_url() ?>admin/getMarksCardDetails",
method:"POST",
data:{
studentID:studentId,
courseID:courseId,
examID:examId
},
// contentType: "application/json;",
success:function(response){
// console.log(response);
$('.marksheet').html(response);
$("#viewAssignment").modal("show");
}
});
}
else {
alert("Student Id is Empty");
}
}
</script>