IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Download </strong>Template</h2>
</div>
<div class="card-body">
<?php if(count($students) == 0): ?>
<p> Apply filter for which class , section and subject you want to upload the marks.</p>
<?php echo Form::open(['method' => 'GET', 'action' => ['School\Exam\ExamPrintMasterController@index'], 'class' => 'form-horizontal']); ?>
<div class="row clearfix">
<div class="col-sm-2 form-control-label">
<label for="classname">Class</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('idClass',$classes,null,['class' => 'form-control select2 show-tick ms','required'=>'required']); ?>
</div>
</div>
<div class="col-sm-2 form-control-label">
<label for="classname">Section</label>
</div>
<div class="col-sm-4">
<div class="form-group">
<div id="idSection" style="border:1px solid #ccc; width:250px; height: 150px; overflow-y: scroll;">
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-2 form-control-label">
<label for="classname">Type</label>
</div>
<div class="col-sm-2">
<div class="form-group">
<?php echo Form::select('idType',['S' => 'Scholastic Area','O' => 'Other Area'],null,['class' => 'form-control show-tick ms','required'=>'required']); ?>
</div>
</div>
<div class="col-sm-2 form-control-label" >
<label for="classname">Subject</label>
</div>
<div class="col-sm-4">
<p id="error-layout" style="display: none;">Not applicable</p>
<div class="form-group" id="subject-layout">
<div id="idSubject" style="border:1px solid #ccc; width:250px; height: 150px; overflow-y: scroll;">
</div>
</div>
</div>
<div class="col-sm-6">
<?php echo Form::submit('View Students',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php echo Form::close(); ?>
</div>
</div>
<?php else: ?>
<a href="/school/exam-print/master" class="btn btn-warning">Reset Filter</a>
<?php endif; ?>
<hr>
<?php if(count($students) > 0): ?>
<table class="table table-hover table-bordered" id="studentTable" style="overflow: auto;">
<thead>
<th>EC No</th>
<th>Student Name</th>
<th>Class</th>
<th>Section</th>
<th>Term</th>
<?php $__currentLoopData = $tableParams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(str_contains($value,'CYCLE')): ?>
<?php $tb = ['READING','WRITING','SPELLING','HANDWRITING','LISTENING','SPEAKING']; ?>
<?php $__currentLoopData = $tb; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ind => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<th><?php echo e($value); ?> ( <?php echo e($data); ?>)</th>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<th><?php echo e($value); ?></th>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</thead>
<tbody>
<?php $__currentLoopData = $students; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php $i=0;?>
<?php $__currentLoopData = $subjects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($var->ecNo); ?></td>
<td><?php if($i==0): ?><?php echo e($var->name); ?><?php endif; ?></td>
<td><?php if($i==0): ?><?php echo e($var->className); ?><?php endif; ?></td>
<td><?php if($i==0): ?><?php echo e($var->sectionName); ?><?php endif; ?></td>
<td><?php echo e($value); ?></td>
<?php $__currentLoopData = $tableParams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $keys => $values): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(str_contains($values,'CYCLE')): ?>
<?php $__currentLoopData = $tb; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ind => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<td></td>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<td></td>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
<?php $i++;?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<hr>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(document).ready(function() {
<?php if(count($students) > 0): ?>
$('#studentTable').DataTable({
responsive: true,
dom: 'Bfrtip',
scrollX: true,
scrollCollapse: true,
fixedColumns: {
left: 2
},
buttons: [
'excel'
]
});
<?php else: ?>
$('#studentTable').DataTable();
<?php endif; ?>
$('select[name="idType"]').on('change', function() {
var typeId = $(this).val();
if(typeId == "S"){
$('#error-layout').hide();
$('#subject-layout').show();
}else{
$('#error-layout').show();
$('#subject-layout').hide();
}
});
$('select[name="idClass"]').on('change', function() {
var classID = $(this).val();
if(classID) {
$.ajax({
url: "<?php echo e(url('/school/class')); ?>"+'/' +classID + "/sections",
type: "GET",
dataType: "json",
success:function(data) {
$('#idSection').empty();
$('#idSection').append('<div class="checkbox-inline" style="padding-left:10px;padding-top:5px;"><label style="margin-right:42px;"><input type="checkbox" class="select-all" id="selectall"><strong>Select All</label></strong></div>');
$.each(data, function(key, value) {
$('#idSection').append('<div class="checkbox-inline" style="padding-left:10px;"><input type="checkbox" name="sections[]" value="'+key+'" class="sectionclass"><label style="margin-right:100px;">'+value+'</label></div>');
});
}
});
$.ajax({
url: "<?php echo e(url('/school/class')); ?>"+'/' +classID + "/subjects",
type: "GET",
dataType: "json",
success:function(data) {
$('#idSubject').empty();
$('#idSubject').append('<div class="checkbox-inline" style="padding-left:10px;padding-top:5px;"><label style="margin-right:42px;"><input type="checkbox" class="sub-all" id="suball"><strong>Select All</label></strong></div>');
$.each(data, function(key, value) {
$('#idSubject').append('<div class="checkbox-inline" style="padding-left:10px;"><input type="checkbox" name="subjects[]" value="'+key+'" class="subclass"><label style="margin-right:100px;">'+value+'</label></div>');
});
}
});
}else{
$('select[name="idSection"]').empty();
$('select[name="idSubject"]').empty();
}
});
});
$(document).on('click', '.sub-all', function(){
var checkAllstd = this.checked;
if(checkAllstd === true){
$("input:checkbox[name='subjects[]']").each(function () {
this.checked = checkAllstd;
});
}else{
$('.subclass').each(function () {
this.checked = checkAllstd;
});
}
});
$(document).on('click', '.select-all', function(){
var checkAllstd = this.checked;
if(checkAllstd === true){
$("input:checkbox[name='sections[]']").each(function () {
this.checked = checkAllstd;
});
}else{
$('.sectionclass').each(function () {
this.checked = checkAllstd;
});
}
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -