IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<!--<div class="card">-->
<div class="body">
<button class="btn btn-raised btn-warning btn-round waves-effect" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">Advance Search</button>
<div class="collapse" id="collapseExample">
<div class="well">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Advance Search</strong></h2>
</div>
<div class="body">
<?php echo Form::open(['method' => 'GET', 'action' => ['School\Exam\AddMarksController@reports'], 'class' => 'form-horizontal']); ?>
<div class="row clearfix">
<div class="col-sm-3">
<div class="form-group">
<label for="classname"><strong>Select Class</strong></label><br>
<?php echo Form::select('idClass',[''=>'--Select--']+$classes,null,['class' => 'form-control show-tick ms select2','required'=>'required']); ?>
<?php if($errors->has('idClass')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idClass')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label for="classname"><strong>Select Section</strong></label><br>
<input type="checkbox" id="idSectionAll" name="idSectionAll" value="selectall">
<label for="idSectionAll" style="color:green"> Select All </label><br>
<select name="sections[]" multiple="multiple" id="idSection">
</select>
<?php if($errors->has('idSection')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idSection')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label for="exams"><strong>Select Exam</strong></label><br>
<select name="idExam" id="idExam" class="form-control show-tick ms">
</select>
<?php if($errors->has('idExam')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idExam')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label for="classname"><strong>Select Subject</strong></label><br>
<input type="checkbox" id="idSubjectAll" name="idSubjectAll" value="selectall">
<label for="idSubjectAll" style="color:green"> Select All </label><br>
<select name="subjects[]" multiple="multiple" id="idSubject" required>
</select>
<?php if($errors->has('idSubject')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idSubject')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-8 offset-sm-2">
<?php echo Form::submit('Search',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--</div>-->
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Marks Report</strong></h2>
</div>
<div class="body table-responsive">
<table class="table table-bordered table-striped table-hover dataTable" id="tableexp">
<thead>
<tr>
<th>S. No.</th>
<th>EC No</th>
<th>Name</th>
<th>Class</th>
<th>Section</th>
<?php if(isset($subjects)): ?>
<?php $__currentLoopData = $subjects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<th colspan="4"><?php echo e($value); ?></th>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<th>Action</th>
</tr>
<tr>
<td colspan="5"></td>
<?php if(isset($subjects)): ?>
<?php $__currentLoopData = $subjects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<td>Theory</td>
<td>Pratical</td>
<td>Marks Obtained</td>
<td>Total Marks</td>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<td></td>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php $__currentLoopData = $students; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td scope="row"><?php echo e($i); ?></td>
<td><?php echo e($value->ecNo); ?></td>
<td><?php echo e($value->name); ?></td>
<td><?php if(isset($value->classM)): ?> <?php echo e($value->classM->className); ?> <?php endif; ?></td>
<td><?php if(isset($value->section)): ?> <?php echo e($value->section->sectionName); ?> <?php endif; ?></td>
<?php if(isset($subjects)): ?>
<?php $__currentLoopData = $subjects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id=>$subject): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$result = \App\ExamSheet::where('exam_marksheet.idSubject',$id)->where('exam_marksheet.idStudent',$value->idStudent)->where('exam_marksheet.idSchool',$value->idSchool)->where('exam_marksheet.idFinancialYear', $value->idFinancialYear)->where('idExam',$idExam)->first();
?>
<?php if($result != null): ?>
<?php if($result->status == "A"): ?>
<td style="background: red;color: white;">Absent</td>
<td style="background: red;color: white;">Absent</td>
<td style="background: red;color: white;">Absent</td>
<?php else: ?>
<?php if(isset($result->marks)): ?>
<td><?php echo e($result->marks); ?></td>
<?php else: ?>
<td>NA</td>
<?php endif; ?>
<?php if(isset($result->pratical)): ?>
<td><?php echo e($result->pratical); ?></td>
<?php else: ?>
<?php if(isset($praticalArr[$id])): ?>
<td>NA</td>
<?php else: ?>
<td>NA</td>
<?php endif; ?>
<?php endif; ?>
<?php if(isset($result->total)): ?>
<td><?php echo e($result->total); ?></td>
<?php else: ?>
<?php if(isset($result->grade)): ?>
<td><?php echo e($result->grade); ?></td>
<?php else: ?>
<td>NA</td>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php else: ?>
<td></td>
<td></td>
<td></td>
<?php endif; ?>
<?php if(isset($totalArr[$id])): ?>
<td><?php echo e($totalArr[$id]); ?></td>
<?php else: ?>
<td> - </td>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<td><a href="<?php echo e(url('school/marks/exam-result/'.$idExam.'/view?student='.$value->idStudent)); ?>" target="_blank">View Detail Result</a></td>
</tr>
<?php $i++; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(document).ready(function() {
$(function () {
$('#tableexp').DataTable({
dom: 'Bfrtip',
scrollY: "500px",
scrollX: true,
scrollCollapse: true,
fixedColumns: {
left: 1
},
buttons: [
{
extend: 'csv', footer: true, text: 'Export to Excel',title:'Student MarkSheet Report',
}
]
});
});
$('#idSection').multiselect({
listWidth: 200,
cssEven: false,
cssOdd: false,
});
$('#idSubject').multiselect({
listWidth: 200,
cssEven: false,
cssOdd: false,
});
var idSection = [];
var classID = ""
$('select[name="idClass"]').on('change', function() {
classID = $(this).val();
$.ajax({
url: "<?php echo e(url('school/class')); ?>"+'/' +classID + "/sections",
type: "GET",
dataType: "json",
success:function(data) {
idSection = [];
$('#idSectionAll').prop('checked', false);
$('#idSection_checklist ul').empty();
$.each(data, function(key, value) {
$('#idSection_checklist ul').append('<li tabindex="0" class=""><input type="checkbox" value="'+key+'" name="idSection[]" id="idSection_'+key+'"><label for="idSection_'+key+'" class="leaveRoomForCheckbox">'+value+'</label></li>');
});
$('#idSection_checklist ul li input[type=checkbox]').each(function(e) {
$(this).change(function(k) {
if(this.checked)
idSection.push($(this).val());
else {
var id = $(this).val();
idSection = idSection.filter(function(item) {
return item !== id
});
}
$.ajax({
url: "<?php echo e(url('/school/class')); ?>"+'/' +classID + "/sections"+'/' +idSection + "/exams",
type: "GET",
dataType: "json",
success:function(data) {
$('#idExam').empty();
$.each(data, function(key, value) {
var option = $("<option />");
option.html(value);
option.val(key);
$('#idExam').append(option);
});
}
});
});
});
}
});
$.ajax({
url: "<?php echo e(url('/school/class')); ?>"+'/' +classID + "/subjects",
type: "GET",
dataType: "json",
success:function(data) {
$('#idSubjectAll').prop('checked', false);
$('#idSubject_checklist ul').empty();
subjects = data;
$.each(data, function(key, value) {
$('#idSubject_checklist ul').append('<li tabindex="0" class=""><input type="checkbox" value="'+key+'" name="idSubject[]" id="idSubject_'+key+'"><label for="idSubject_'+key+'" class="leaveRoomForCheckbox">'+value+'</label></li>');
});
}
});
});
$("button[data-id=idSection").hide();
$('#idSectionAll').change(function() {
if(this.checked) {
$("#idSection_checklist").addClass('checklistHighlighted');
$("#idSection_checklist ul").children().addClass('checked');
$("#idSection_checklist ul li input[type=checkbox]").each(function(e) {
$(this).prop('checked', true);
idSection.push($(this).val());
});
if(classID != ""){
$.ajax({
url: "<?php echo e(url('/school/class')); ?>"+'/' +classID + "/sections"+'/' +idSection + "/exams",
type: "GET",
dataType: "json",
success:function(data) {
$('#idExam').empty();
$.each(data, function(key, value) {
var option = $("<option />");
option.html(value);
option.val(key);
$('#idExam').append(option);
});
}
});
}
}else{
$("#idSection_checklist").removeClass('checklistHighlighted');
$("#idSection_checklist ul").children().removeClass('checked');
$("#idSection_checklist ul li input[type=checkbox]").each(function(e) {
$(this).prop('checked', false);
var id = $(this).val();
idSection = idSection.filter(function(item) {
return item !== id
});
});
}
});
$('#idSubjectAll').change(function() {
if(this.checked) {
$("#idSubject_checklist").addClass('checklistHighlighted');
$("#idSubject_checklist ul").children().addClass('checked');
$("#idSubject_checklist ul li input[type=checkbox]").each(function(e) {
$(this).prop('checked', true);
});
}else{
$("#idSubject_checklist").removeClass('checklistHighlighted');
$("#idSubject_checklist ul").children().removeClass('checked');
$("#idSubject_checklist ul li input[type=checkbox]").each(function(e) {
$(this).prop('checked', false);
});
}
});
$("button[data-id=idSection").hide();
$("button[data-id=idSubject").hide();
$("#idSection_actionButtons").hide();
$("#idSubject_actionButtons").hide();
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -