

<?php $__env->startSection('title'); ?> প্রশ্ন | TESTPAPER <?php $__env->stopSection(); ?>
<?php $__env->startSection('department'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('department.index'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('styles'); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('main_content_section'); ?>

<div class="row py-3 ps-2">
  <div class="heading d-flex justify-content-start heading-margin-bottom-minus">
    <h3 class="mb-0 pb-0"><span>প্রশ্নের তালিকা</span><span> <a class="heading-font" href="<?php echo e(route('admin.dashboard')); ?>"> । এডমিন</a></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('post')); ?>" class="text-primary py-2 px-3 ">সব (<?php echo e($allQuestions->count()); ?>)</a>
          </p>
          <p class="mb-0"><a href="<?php echo e(route('active-question-list')); ?>"
              class="text-primary py-2 px-3">সক্রিয় (<?php echo e($activeQuestionCount); ?>)</a></p>
          <p class="mb-0"><a href="<?php echo e(route('inactive-question-list')); ?>"
              class="text-primary py-2 px-3 active">নিষ্ক্রিয় (<?php echo e($inactiveQuestionCount); ?>)</a></p>
        </div>
        <div class="d-none d-sm-block">
          <?php if(Auth::user()->can('question-create')): ?> 
            <a href="<?php echo e(route('question.create')); ?>" class="btn btn-success rounded-0 d-flex align-items-center px-2 border-0"><span class="">নতুন প্রশ্ন</span></a>
          <?php endif; ?>
        </div>
      </div>

      <?php if(Auth::user()->can('question-create')): ?> 
        <div class="mt-2 btn btn-success d-block rounded-0 d-sm-none"><a class="text-white" href="<?php echo e(route('question.create')); ?>"> নতুন প্রশ্ন</a></div>
      <?php endif; ?> 
    </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"><span>আইডি</span></th> 
            <th class="text-center" scope="col"><span>বর্তমান অবস্থা</span></th>
          </tr>
        </thead>
        <tbody class="text-center">

          <?php $__currentLoopData = $questions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          <?php if(isset($item) && $item != null): ?>
          <?php
          $questionTagData = App\Models\QuestionTag::getExamListWithPostId($item->id);
          ?>
          <tr class="">


            <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 $item->question; ?>


              <span class="text-violet" style="font-weight:600;"> ট্যাগের নাম: </span>

              <?php $__currentLoopData = $questionTagData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $singleTagData): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <?php if(isset($singleTagData) && $singleTagData->tagData != null): ?>
              <span class=""><?php echo e($singleTagData->tagData->tag_name); ?></span>,
              <?php endif; ?>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              <br>

          </td>


          <td class=" text-left">
            <b>উত্তর-1: </b> <?php echo e($item->question_answer1); ?><br>
            <b>উত্তর-2: </b> <?php echo e($item->question_answer2); ?><br>
            <b>উত্তর-3: </b> <?php echo e($item->question_answer3); ?><br>
            <b>উত্তর-4: </b> <?php echo e($item->question_answer4); ?><br>
           </td>

           <td>
            <?php echo e($item->right_answer); ?>

            <div class="row-actions mt-3 text-center">
              <?php if(Auth::user()->can('question-edit')): ?> 
                <a href="<?php echo e(route('question.edit',$item->id)); ?>"><button class="edit_class_modal border-0 bg-transparent" value="<?php echo e($item->id); ?>"
                    onclick="updateDepartment(<?php echo e($item->id); ?>)"><span class="text-primary">সম্পাদন</span>  |  </button></a>
              <?php endif; ?>

              <?php if(Auth::user()->can('question-delete')): ?> 
                <span><a href="<?php echo e(route('question.delete', ['id'=>$item->id])); ?>" class="row-delete"><span
                  class="trash text-danger">ডিলিট</span> | </a></span>
              <?php endif; ?>

              <?php if($item->status == true): ?>
              <span><a class="text-warning" href="<?php echo e(route('question-inactive', $item->id)); ?>">নিস্ক্রিয়</a></span>
              <?php else: ?>
              <span><a class="text-success" href="<?php echo e(route('question-active', $item->id)); ?>">সক্রিয়</a></span>
              <?php endif; ?>
            </div>
          </td>
            <td>
                <span class=" text-primary" style=" font-weight:600;">C:
                </span><?php echo e($item->classData->id); ?>,
                <span class=" text-primary" style=" font-weight:600;">D:
                </span><?php echo e($item->departmentData->id); ?>,
                <span class=" text-primary" style=" font-weight:600;">S:
                </span><?php echo e($item->subjectData->id); ?>,
                <span class=" text-primary" style=" font-weight:600;">Ch:
                </span><?php echo e($item->chapterData->id); ?>,
            </td>

            <td>
              <?php if($item->status == true): ?>
              <span class="badge bg-success">সক্রিয়</span>
              <?php else: ?>
              <span class="badge bg-danger">নিষ্ক্রিয়</span>
              <?php endif; ?>
            </td>

          </tr>

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


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


</div>








<?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/question/inActiveList.blade.php ENDPATH**/ ?>