283 lines
11 KiB
PHP
Executable File
283 lines
11 KiB
PHP
Executable File
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
|
?>
|
|
<!--sidebar end-->
|
|
<!--main content start-->
|
|
<div class="app-content content">
|
|
<section class="content-wrapper">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<h3 class="font-weight-bold">
|
|
|
|
<?php
|
|
$tlPctg = 0; $videoseen = 0;
|
|
foreach($vList as $videos) {
|
|
if($videos->marks_percentage != 'NAN')
|
|
{
|
|
$tlPctg = $tlPctg + $videos->marks_percentage;
|
|
$videoseen++;
|
|
|
|
}
|
|
} ?>
|
|
<?php echo lang('Video List'); ?> | <a href="#" class="badge badge-info">video seen: <?=$videoseen?>/<?php echo count($assignVideo); ?></a>
|
|
</h3>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<hr class="mt-0 mb-0" />
|
|
<div class="card-content collapse show">
|
|
<div class="card-body card-dashboard">
|
|
<div class="panel-body">
|
|
<div class="adv-table editable-table ">
|
|
<div class="space15"></div>
|
|
<table class="table table-striped table-bordered dom-jQuery-events" id="editable-sample" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th>Sl.no</th>
|
|
<th>Title</th>
|
|
<th>View Status</th>
|
|
<th>Percentage</th>
|
|
<th class="no-print" style="width: 30%;">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php
|
|
foreach($vList as $videos) {
|
|
$options1 = '<a class="btn btn-primary" title="' . lang('Edit') .'" href="'.base_url().'caregivers/chatHistory/'. $videos->id .'/'.$cgid.'" ><i class="la la-edit"></i>' . lang('Chat History') .' </a>';
|
|
$options2 = '<a class="btn btn-danger" title="' . lang('Edit') .'" href="'.base_url().'caregivers/quizResult/'. $videos->id .'/'.$cgid.'" ><i class="la la-edit"></i>' . lang('Quiz result') .' </a>';
|
|
?>
|
|
<tr>
|
|
<td><?php static $p=1; echo $p; $p++; ?></td>
|
|
|
|
<td><?php echo $videos->video_title; ?></td>
|
|
<td><?php if($videos->watchStatus == 0){ ?> <span class="badge badge-success" style="background-color: #f1f1f1; color:#3c3c3c;">Exam Pending <img src="<?=base_url()?>/common/img/pending.png" width="15px" height="auto" /></span> <?php } else { ?> <span class="badge badge-success" style="background-color: #f1f1f1; color:#3c3c3c;">Exam Completed <img src="<?=base_url()?>/common/img/completed.jpg" width="15px" height="auto" /> </span> <?php } ?></td>
|
|
<td><?php if($videos->marks_percentage =='NAN'){ echo "N/A"; } else{ echo $videos->marks_percentage."%"; } ?></td>
|
|
<td><?php echo $options1." ".$options2 ?></td>
|
|
</tr>
|
|
<?php } ?>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
|
|
<!--main content end-->
|
|
<!--footer start-->
|
|
|
|
|
|
|
|
|
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title"> <?php echo lang('State list'); ?></h4>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form role="form" action="master_state_list/addnew" onsubmit="return validateForm()" class="clearfix" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
|
|
<div class="form-group col-md-6">
|
|
<label for="exampleInputEmail1" class="required"><?php echo lang('Name'); ?></label>
|
|
<input type="text" class="form-control" name="slot_name" id="slot_name1" value='' placeholder="">
|
|
|
|
</div>
|
|
<section class="col-md-12" id="msg_rm">
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="col-md-12">
|
|
<button type="submit" name="submit" class="btn btn-info pull-right"><?php echo lang('submit'); ?></button>
|
|
</section>
|
|
</form>
|
|
|
|
</div>
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-dialog -->
|
|
</div>
|
|
<!-- Add Patient Modal-->
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
|
<script type="text/javascript">
|
|
|
|
|
|
function validateConfirm(){
|
|
var r = confirm("Are you sure you want to delete this item?");
|
|
return r;
|
|
}
|
|
|
|
|
|
function validateForm(){
|
|
var fldval = $("#slot_name1").val();
|
|
if(fldval == ""){
|
|
$("#msg_rm").html("<div class='alert alert-danger' role='alert'> Please enter a value</div>");
|
|
return false;
|
|
}
|
|
|
|
var fldval = $("#slot_name1").val();
|
|
var msgs = '';
|
|
$.ajax('master_state_list/duplicateCheck', {
|
|
type: 'POST', // http method
|
|
data: { val: fldval,<?php echo $this->security->get_csrf_token_name(); ?>:'<?php echo $this->security->get_csrf_hash(); ?>'}, // data to submit
|
|
async: false,
|
|
success: function (data, status, xhr) {
|
|
// $('p').append('status: ' + status + ', data: ' + data);
|
|
// alert(data);
|
|
msgs = data;
|
|
|
|
},
|
|
error: function (jqXhr, textStatus, errorMessage) {
|
|
// $('p').append('Error' + errorMessage);
|
|
alert("error duc");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
if(msgs == 'exist'){
|
|
$("#msg_rm").html("<div class='alert alert-danger' role='alert'> Value already exist in the list</div>");
|
|
return false;
|
|
}
|
|
else{
|
|
return true;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
// var table = $('#editable-sample').DataTable({
|
|
// responsive: true,
|
|
|
|
// "processing": true,
|
|
// "serverSide": true,
|
|
// "searchable": true,
|
|
// "ajax": {
|
|
// url: "<?php echo base_url(); ?>caregivers/getVideoList",
|
|
// type: 'POST',
|
|
// data: {'cgtype':<?php echo "'".$cgtype."'"; ?>,'cgid':<?php echo "'".$cgid."'"; ?> ,'<?php echo $this->security->get_csrf_token_name(); ?>' : '<?php echo $this->security->get_csrf_hash(); ?>'},
|
|
// },
|
|
// scroller: {
|
|
// loadingIndicator: true
|
|
// },
|
|
|
|
// dom: "<'row'<'col-sm-5 data-table-pagelimit'l><'col-sm-6 data-table-search'f><'col-sm-1 text-center data-table-button-collection'B>>" +
|
|
// "<'row'<'col-sm-12 data-table-body'tr>>" +
|
|
// "<'row'<'col-sm-5 data-table-pagecountsummary'i><'col-sm-7 data-table-pagination'p>>",
|
|
// buttons: [
|
|
// {
|
|
// extend: 'collection',
|
|
// text: '...',
|
|
// buttons: [
|
|
// 'copyHtml5',
|
|
// 'excelHtml5',
|
|
// 'csvHtml5',
|
|
// 'pdfHtml5',
|
|
// {
|
|
// extend: 'print',
|
|
// exportOptions: {
|
|
// columns: [0, 1, 2, 3, 4, 5, 6],
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
// ],
|
|
|
|
// aLengthMenu: [
|
|
// [10, 25, 50, 100, -1],
|
|
// [10, 25, 50, 100, "All"]
|
|
// ],
|
|
// iDisplayLength: 100,
|
|
// "order": [[1, "asc"]],
|
|
|
|
// "language": {
|
|
// "lengthMenu": "_MENU_",
|
|
// search: "_INPUT_",
|
|
// "url": "common/assets/DataTables/languages/<?php echo $this->language; ?>.json"
|
|
// },
|
|
// "columnDefs": [
|
|
// { "orderable": false, "targets": [0,3] }
|
|
// ]
|
|
// });
|
|
// table.buttons().container().appendTo('.custom_buttons');
|
|
});
|
|
</script>
|
|
|
|
|
|
<?php
|
|
if(isset($_SESSION['deleted'])){
|
|
?>
|
|
<script>
|
|
$(function(){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: 'Successfully Deleted',
|
|
showConfirmButton: false,
|
|
timer: 2000
|
|
})
|
|
})
|
|
</script>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
if(isset($_SESSION['edited'])){
|
|
?>
|
|
<script>
|
|
$(function(){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: 'Successfully Edited',
|
|
showConfirmButton: false,
|
|
timer: 2000
|
|
})
|
|
})
|
|
</script>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
if(isset($_SESSION['added'])){
|
|
?>
|
|
<script>
|
|
$(function(){
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'success',
|
|
title: 'Successfully Added',
|
|
showConfirmButton: false,
|
|
timer: 2000
|
|
})
|
|
})
|
|
</script>
|
|
<?php
|
|
}
|
|
|
|
?>
|