
<?php $__env->startSection('title'); ?> পরীক্ষা | TESTPAPER <?php $__env->stopSection(); ?>
<?php $__env->startSection('exam'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('exam.index'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('styles'); ?>
<?php $__env->stopSection(); ?>

<!-- BEGIN: Content-->
<?php $__env->startSection('main_content_section'); ?>
<div class="row py-3 ps-2">
  <div class="heading d-flex justify-content-start align-items-center">
    <h3 class="mb-0"><span> পরীক্ষা তালিকা</span></h3>
  </div>
</div>


<div class="table_wrapper py-1 card">
  <div class="row my-2 aggregate-section-div">
    <div class="px-3 ">
      <div class=" d-flex justify-content-between align-items-center aggregate-section border">
        <div class="d-flex align-items-center py-1">
          <p class="mb-0"><a href="<?php echo e(route('chapter')); ?>" class=" text-primary py-2 px-3 active">সব
              (<?php echo e($exams->count()); ?>)</a></p>
        </div>
        <div class="d-none d-sm-block">
        </div>
      </div>
    </div>
  </div>



  <div class="row px-3">
    <div class="table-container table-responsive">
      <table id="" class="table table-bordered">
        <thead class="text-uppercase">
          <tr class="me-3">
            <th class="text-center" scope="col"><span>পরীক্ষার ধরণ</span></th>
            <th class="text-center" scope="col"><span>একাডেমিক</span></th>
            <th class="text-center" scope="col"><span>পরীক্ষা</span></th>
            <th class="text-center" scope="col">আইডি</th>
            <th class="text-center" scope="col">প্রশ্নপত্র</th>
          </tr>
        </thead>
        <tbody class="text-center">

          <?php $__currentLoopData = $exams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          <?php if(isset($item) && $item != null): ?>
          <tr>
            <td>
              <div class="row_title">
                <?php if(isset($item->chapterData) && $item->chapter_id != null): ?>
                <strong><a href="#">অধ্যায় পরীক্ষা :</a></strong>
                <?php else: ?>
                <strong><a href="#">বিষয় পরীক্ষা :</a></strong>
                <?php endif; ?>
              </div>
              <div class="row-actions">
                <?php if(Auth::user()->can('exam-edit')): ?> 
                  <span><a class="text-warning" href="<?php echo e(route('exam.edit', $item->id)); ?>">সম্পাদন</a></span>
                <?php endif; ?>

               <?php if(Auth::user()->can('exam-delete')): ?> 
                 <span><a href="<?php echo e(route('exam.delete', ['id'=>$item->id])); ?>" class="row-delete"><span
                       class="trash text-danger">ডিলিট</span> | </a></span>
               <?php endif; ?>
              </div>
            </td>
            
            <td class=" text-left">
              <?php if(isset($item->chapterData) && $item->chapter_id != null): ?>
              <b>শ্রেণি: </b> <?php echo e($item->classData->class_name); ?><br>
              <b>বিভাগ: </b> <?php echo e($item->departmentData->department_name); ?><br>
              <b>বিষয়: </b> <?php echo e($item->subjectData->subject_name); ?><br>
              <b>অধ্যায়: </b> <?php echo e($item->chapterData->chapter_name); ?><br>
              <?php else: ?>
              <b>শ্রেণি: </b> <?php echo e($item->classData->class_name); ?><br>
              <b>বিভাগ: </b> <?php echo e($item->departmentData->department_name); ?><br>
              <b>বিষয়: </b> <?php echo e($item->subjectData->subject_name); ?><br>
              <?php endif; ?>
              <b>পরীক্ষার নাম: </b> <?php echo e($item->exam_name); ?><br>
            </td>
            
            
            <td class=" text-left">
              <b>প্রশ্নের সংখ্যা: </b> <?php echo e($item->question_qty); ?><br>
              <b>পরীক্ষার সময়কাল: </b> <?php echo e($item->exam_duration); ?><br>
              <b>টোটাল নাম্বার: </b> <?php echo e($item->total_mark); ?><br>
              <b>পাস নাম্বার: </b> <?php echo e($item->pass_mark); ?><br>
              <b>তারিখ: </b> <?php echo e($item->start_date); ?><br>
              <b>সময়: </b> <?php echo e($item->start_time); ?><br>
            </td>

            <td>
              <b class="custom-exam-id"><?php echo e($item->id); ?></b>
            </td>
            
            <td class="text-center">
              <?php if(isset($item) && $item->is_exam_sheet == true): ?>
                <span class="bg-success text-white p-1 rounded custom-exam-table">তৈরি হয়েছে</span>
              <?php else: ?>
                <span class="bg-danger text-white p-1 rounded custom-exam-table">তৈরি হয়নি</span>
              <?php endif; ?>
            </td>

          </tr>

          <?php endif; ?>
          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


        </tbody>
      </table>
    </div>

    <div class="clearfix d-flex">
      <div class="float-left">
        <p class="text-muted">
          <?php echo e(__('Showing')); ?>

          <span class="font-weight-bold"><?php echo e($exams->firstItem()); ?></span>
          <?php echo e(__('to')); ?>

          <span class="font-weight-bold"><?php echo e($exams->lastItem()); ?></span>
          <?php echo e(__('of')); ?>

          <span class="font-weight-bold"><?php echo e($exams->total()); ?></span>
          <?php echo e(__('results')); ?>

        </p>
      </div>

      <div class="float-right custom-table-pagination">
        <?php echo $exams->links('pagination::bootstrap-4'); ?>

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

<?php $__env->startSection('scripts'); ?>
<script>
  //To show update modal...
  function updateExamCategory(id) {
    $("#updateExamCategory"+id).modal('show');
  }
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Project\Personal-Project\Office-Project\update\test-paper-final\resources\views/admin/exam/index.blade.php ENDPATH**/ ?>