<?php $__env->startSection('title'); ?>
    <?php echo e(Settings('site_title')  ? Settings('site_title')  : 'Infix LMS'); ?> | <?php echo e(__('survey.Survey')); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('css'); ?> <?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?> <?php $__env->stopSection(); ?>

<?php $__env->startSection('mainContent'); ?>
    <style>
        .pb_50 {
            padding-bottom: 50px;
        }

        .cs_modal .modal-body input, .cs_modal .modal-body .nice_Select {
            height: 60px;
            line-height: 50px;
            padding: 0px 22px;
            border: 1px solid #F1F3F5;
            color: #707070;
            font-size: 14px;
            font-weight: 500;
            background-color: #fff;
            width: 100%;
        }

        .modal_1000px {
            max-width: 1000px;
        }
    </style>
    <div class="main_content_iner main_content_padding">

        <div class="dashboard_lg_card">
            <div class="container-fluid g-0">
                <div class="row">
                    <div class="col-12">
                        <div class="p-4">
                            <div class="row">
                                <div class="col-12">
                                    <div class="section__title3 mb_40">
                                        <h3 class="mb-0"><?php echo e(__('survey.Survey')); ?></h3>
                                        <h4></h4>
                                    </div>
                                </div>
                            </div>
                            <?php if(count($surveys)==0): ?>
                                <div class="col-12">
                                    <div class="section__title3 margin_50">
                                        <p class="text-center"><?php echo e(__('survey.Survey Not Assigned')); ?></p>
                                    </div>
                                </div>
                            <?php else: ?>
                                <div class="row">
                                    <div class="col-xl-12">
                                        <div class="table-responsive">
                                            <table class="table custom_table3 mb-0">
                                                <thead>
                                                <tr>
                                                    <th scope="col"><?php echo e(__('common.SL')); ?></th>
                                                    <th scope="col"><?php echo e(__('common.Name')); ?></th>
                                                    <th scope="col"><?php echo e(__('courses.Course')); ?></th>
                                                    <th scope="col"><?php echo e(__('common.Type')); ?></th>
                                                    <th scope="col"><?php echo e(__('common.Action')); ?></th>
                                                </tr>
                                                <tbody>
                                                <?php
                                                    $i =1;
                                                ?>

                                                <?php $__currentLoopData = $surveys; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $survey): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                                    <?php
                                                        if ($survey->set_time && !empty($survey->publish_date)){
                                                            $startTime = \Carbon\Carbon::createFromFormat('m/d/Y' . ' g:i A', $survey->publish_date . ' ' . $survey->publish_time);
                                                              $isStart = now()->gt($startTime);

                                                              if (!$isStart){
                                                                  continue;
                                                              }
                                                        }
                                                    ?>
                                                    <?php if($survey->survey_type!=1): ?>
                                                        <?php
                                                            try {
 $expireTime = \Carbon\Carbon::createFromFormat('m/d/Y' . ' g:i A', $survey->deadline_date . ' ' . $survey->deadline_time);
                                                             $isExpire = now()->gt($expireTime);

 }catch (\Exception $exception){
$isExpire =true;
 }
                                                              if ($isExpire){
                                                                  continue;
                                                              }
                                                        ?>
                                                    <?php endif; ?>

                                                    <tr>
                                                        <td scope="col"><?php echo e($i); ?></td>
                                                        <td scope="col"><?php echo e($survey->title); ?></td>
                                                        <td scope="col"><?php echo e($survey->course->title); ?></td>
                                                        <td scope="col">
                                                            <?php if($survey->survey_type==1): ?>
                                                                <?php echo e(__('survey.Course survey')); ?>

                                                            <?php else: ?>
                                                                <?php echo e(__('survey.Independence')); ?>

                                                            <?php endif; ?>
                                                        </td>
                                                        <td scope="col">
                                                            <a href="<?php echo e(route('survey.student_survey_participate', $survey->id)); ?>"
                                                               class=" link_value theme_btn small_btn4"
                                                               type="button">
                                                                <?php echo e($survey->loginUserParticipant()?trans('common.Edit'):trans('survey.Participate')); ?>

                                                            </a>
                                                        </td>
                                                    </tr>
                                                    <?php
                                                        $i++;
                                                    ?>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                                                </tbody>
                                            </table>
                                            <?php echo e($surveys->links()); ?>

                                        </div>
                                    </div>
                                </div>
                            <?php endif; ?>

                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make(theme('layouts.dashboard_master'), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/minialms/app.minialms.com/resources/views/frontend/infixlmstheme/pages/mySurvey.blade.php ENDPATH**/ ?>