IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/8f17b0aa6e0b9d7725c8325c42ec74e6bc8b0323.php

<?php $__env->startSection('content'); ?>
<div class="row clearfix">
    <div class="col-sm-5">
        <div class="card">
            <div class="header">
                <h2>Create Live Class</h2>
            </div>
            <div class="body">
                <?php if(isset($homework)): ?>
                <?php echo Form::model($homework, ['method' => 'PATCH', 'action' => ['Teacher\VideoConfController@update', $homework->idHomework], 'class' => 'form-horizontal']); ?>

                <?php else: ?>
                <?php echo Form::open(['url' => 'teacher/videoconf', 'class' => 'form-horizontal','id'=>'homework_form']); ?>

                <?php endif; ?>
                <div class="row clearfix">
                    <div class="col-sm-4 form-control-label">
                        <label for="classname">Class</label>
                    </div>
                    <div class="col-sm-8">
                        <div class="form-group">
                            <?php echo Form::select('idClass',$classes,null,['class' => 'form-control show-tick ms select2']); ?>

                            <?php if($errors->has('idClass')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('idClass')); ?></strong>
                            </label>
                            <?php endif; ?>
                            <span id='classerror'></span>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-4 form-control-label">
                        <label for="classname">Select Section</label>
                    </div>
                    <div class="col-sm-8">
                        <div class="form-group">
                            <div id="idSection" style="border:1px solid #ccc; width:250px; height: 110px; overflow-y: scroll;">
                                
                            </div>
                            <?php if($errors->has('idSection')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('idSection')); ?></strong>
                            </label>
                            <?php endif; ?>
                             <span id='sectionerror'></span>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-4 form-control-label">
                        <label for="classname">Select Type</label>
                    </div>
                    <div class="col-sm-8">
                        <div class="form-group">
                            <?php echo Form::select('idType',["all"=>"All","odd"=>"ODD","even"=>"EVEN"],null,['class' => 'form-control show-tick ms select2']); ?>

                           
                            <?php if($errors->has('idType')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('idType')); ?></strong>
                            </label>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-4 form-control-label">
                        <label for="classname">Select Technology</label>
                    </div>
                    <div class="col-sm-8">
                        <div class="form-group">
                            <?php echo Form::select('idTechType',["0"=>"Youtube","1"=>"Google Meet","2"=>"Zoom","3"=> "Protal Based"],null,['class' => 'form-control show-tick ms select2','id'=>'techvideo']); ?>

                           
                            <?php if($errors->has('idTechType')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('idTechType')); ?></strong>
                            </label>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-4 form-control-label">
                        <label for="classname" id="urllabel">Paste url or key here</label>
                    </div>
                    <div class="col-sm-8">
                        <div class="form-group">
                           <?php echo Form::text('key',null,['class' => 'form-control']); ?>

                           <?php if($errors->has('key')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('key')); ?></strong>
                            </label>
                            <?php endif; ?>
                            <span id="keyerror"></span>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-4 form-control-label">
                        <label for="classname">Class Title</label>
                    </div>
                    <div class="col-sm-8">
                        <div class="form-group">
                           <?php echo Form::text('title',null,['class' => 'form-control']); ?>

                           <?php if($errors->has('title')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('title')); ?></strong>
                            </label>
                            <?php endif; ?>
                            <span id="titleerror"></span>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-4 form-control-label">
                        <label for="classname">Class Timings</label>
                    </div>
                    <div class="col-sm-8">
                        <div class="form-group">
                           <?php echo Form::date('startdate',null,['class' => 'form-control','required'=>'required']); ?>

                           <?php echo Form::time('starttime',null,['class' => 'form-control','required'=>'required','step'=>'1']); ?>

                            <?php if($errors->has('description')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('description')); ?></strong>
                            </label>
                            <?php endif; ?>
                            <span id="descerror"></span>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-8 offset-sm-2">
                        <?php if(isset($homework)): ?>
                        <?php echo Form::submit('UPDATE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>

                        <?php else: ?>
                        <?php echo Form::submit('SAVE NOW',['class' => 'btn btn-raised btn-primary btn-round waves-effect','id'=>'submit-btn']); ?>

                        <?php endif; ?>
                        <?php echo Form::close(); ?> 
                    </div>
                </div>

            </div>
        </div>
    </div>
<!--</div>
<div class="row clearfix">-->
    <div class="col-sm-7">
        <div class="card">
            <div class="header">
                <h2><strong>List Of Live Class</strong></h2>
            </div>
            <div class="body table-responsive">
                <table class="table table-bordered table-striped table-hover js-basic-example dataTable" id="videoTable">
                    <thead>
                        <tr>
                            <th>S. No.</th>
                            <th>Date</th>
                            <th>Title</th>
                            <th>Description</th>
                            <th>Class</th>
                            <th>Section</th>
                            <th>Type</th>
                            <th>Key/URL</th>
                            <th>Status</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(document).ready(function() {
    
    //
    $('#techvideo').change(function() {
           var val = $(this).val();
           if((val == '0')){
              $('#urllabel').empty();
              $('#urllabel').append('Paste url or key here');
           }else if(val == '1'){
              $('#urllabel').empty();
              $('#urllabel').append('Paste Google Meet Url here');
           }else if(val == '2'){
              $('#urllabel').empty();
              $('#urllabel').append('Paste Zoom Url');
           }else{
               $('#urllabel').empty();
               $('#urllabel').append('Paste  Url here');
           }
       });
  
//
    $('#videoTable').DataTable( {
        "processing": true,
        "destroy": true,
        "serverSide": true,
        "ajax": "<?php echo e(url('teacher/videoconf')); ?>"
    } );

    $('select[name="idClass"]').on('change', function() {
        var classID = $(this).val();
        if(classID!='All') {
            $.ajax({
                url: "<?php echo e(url('/teacher/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;"><strong>Select All</label></strong><input type="checkbox" name="idSection" class="select-all" id="selectall" value ="All"></div>');
                    $.each(data, function(key, value) {
                       $('#idSection').append('<div class="checkbox-inline" style="padding-left:10px;"><label style="margin-right:100px;">'+value+'</label><input type="checkbox" name="idSection" value="'+key+'" class="sectionclass"></div>');
                        
                    });
                    $('input[type="checkbox"]').on('change', function() {
                       $('input[type="checkbox"]').not(this).prop('checked', false);
                    });
                }
            });
        }else{
            $('select[name="idSection"]').empty();
        }
    });


    
});
$(document).on('click', '.select-allstd', function(){
    var checkAllstd = this.checked;
        if(checkAllstd === true){
            $("input:checkbox[name='students[]']").each(function () {
               this.checked = checkAllstd;
           });
        }else{
            $('.stdallselect').each(function () {
                this.checked = checkAllstd;
            });
        }
});

// Delete Feehead
$(document).on('click', '.js-sweetalert', function (e) {
    $.ajaxSetup({
        headers: {
          'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });
    e.preventDefault();
    var id = $(this).data('id');
    swal({
            title: "Are you sure?",
            text: "Are You sure you want to delete this Conference!",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "Yes, delete it!",
            closeOnConfirm: true
        },
        function() {
         //   console.log('here');
            $.ajax({
                type: "DELETE",
                url: "<?php echo e(url('/teacher/videoconf/')); ?>" +"/"+id,
                data: {id:id}
                       
            })
            .done(function(data) {
                swal({
                    title: "Deleted", 
                    text: "Live Class has been successfully deleted", 
                    type: "success"
                },function() {
                    location.reload();
                });
            })
            .error(function(data) {
              swal("Oops", "We couldn't connect to the server!", "error");
            });
            return false;
    });
});

// Saving form data
$('#homework_form').on('submit',function(e){
    $.ajaxSetup({
    header:$('meta[name="_token"]').attr('content')
  });
    var formData =  new FormData($('#homework_form')[0]);
    $("#submit-btn").prop('disabled', true);
    $.ajax({
        type:"POST",
        url: "<?php echo e(url('teacher/videoconf')); ?>",
        processData: false,
        contentType: false,
        data:formData,
        dataType: 'json',
        success:function(data){
            if( data[Object.keys(data)[0]] === 'SUCCESS' ){
                $("#submit-btn").prop('disabled', true);
                window.location = "<?php echo e(url('teacher/videoconf')); ?>";
            }
            else {                  //False Case: With error msg
            $("#msg").html(data);   //$msg is the id of empty msg
            }

        },

        error: function(data){
                    if( data.status === 422 ) {
                        $("#submit-btn").prop('disabled', false);
                        var errors = data.responseJSON.errors;
                        var errorHtml = '<div class="alert alert-danger"><ul>';
                           $('#formerrors').html(errorHtml);
                                if(errors['idClass']=== undefined){
                                    $( '#classerror' ).empty();
                                }else{
                                   errorname = '<span class="help-block"><strong>'+errors['idClass']+'</strong></span>';
                                   $( '#classerror' ).html( errorname );
                                }
                                if(errors['idSection']=== undefined){
                                    $( '#sectionerror' ).empty();
                                }else{
                                   errorname = '<span class="help-block"><strong>'+errors['idSection']+'</strong></span>';
                                   $( '#sectionerror' ).html( errorname );
                                }
                                if(errors['key']=== undefined){
                                    $( '#keyerror' ).empty();
                                }else{
                                   errorname = '<span class="help-block"><strong>'+errors['key']+'</strong></span>';
                                   $( '#keyerror' ).html( errorname );
                                }
                                if(errors['title']=== undefined){
                                    $( '#titleerror' ).empty();
                                }else{
                                   errorname = '<span class="help-block"><strong>'+errors['title']+'</strong></span>';
                                   $( '#titleerror' ).html( errorname );
                                }

                                if(errors['description']=== undefined){
                                    $( '#descerror' ).empty();
                                }else{
                                   errorname = '<span class="help-block"><strong>'+errors['description']+'</strong></span>';
                                   $( '#descerror' ).html( errorname );
                                }
                                
                             
                                
                    }
            }
    });
    return false;
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('teachers.teacher_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

Copyright © 2021 - 2025 IMMREX7