

<?php $__env->startSection('title'); ?>
    <?php if(isset($exam->type)): ?>
        <?php if($exam->type == 0): ?>
            الاختبار القبلي
        <?php elseif($exam->type == 1): ?>
            الاختبار البعدي
        <?php else: ?>
            اختبار الإجتياز
        <?php endif; ?>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

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

<?php $__env->startSection('header-content'); ?>
    <?php if(isset($exam->room->course->title)): ?>
        <?php echo e($exam->room->course->title); ?>

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

<?php $__env->startSection('content-body'); ?>
    <!--**********************************
                                            Content body start
                                        ***********************************-->
    <?php echo $__env->make('massages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <span data-expire="<?php if(isset($exam->expire)): ?><?php echo e($exam->expire); ?><?php endif; ?>"
        title="<?php if(isset($exam->expire)): ?><?php echo e($exam->expire); ?><?php endif; ?>" class="badge badge-primary light timer-btn"
        id="expire-time"><i class="bi bi-clock"></i></span>


    <!-- row -->
    <div class="container-fluid">
        <div class="row invoice-card-row">
            <div class="row invoice-card-row">

                <div class="col-xl-12">
                    <div class="card">
                        <div class=" d-flex d-flex justify-content-between card-header">
                            <div>
                                <?php if(isset($exam->type)): ?>
                                    <?php if($exam->type == 0): ?>
                                        <h4 class="card-title ">الاختبار القبلي </h4>
                                    <?php elseif($exam->type == 1): ?>
                                        <h4 class="card-title ">الاختبار البعدي </h4>
                                    <?php else: ?>
                                        <h4 class="card-title ">اختبار الإجتياز </h4>
                                    <?php endif; ?>
                                <?php endif; ?>
                            </div>
                            <div>
                                <?php if(isset($exam->room->name)): ?>
                                    <h4 class="card-title "><?php echo e($exam->room->name); ?> برنامج <?php echo e($exam->room->course->title); ?></h4>
                                <?php endif; ?>
                            </div>
                        </div>

                        <div class="card-body pb-3 tran px-5">
                            <div class="form-validation">
                                <form class="validation need-validation" method="POST"
                                    action="<?php echo e(route('students_exam_store')); ?>">
                                    <?php echo csrf_field(); ?>
                                    <input type="hidden" value="<?php echo e($exam->id); ?>" name="examId">
                                    <input type="hidden" value="<?php echo e(Auth::id()); ?>" name="studentId">
                                    <div class="card-header">
                                        <h5 class="card-title ">اسئلة الاختبار</h5>
                                    </div>
                                    <div class=" all-quations   py-3 mb-2" id="allQuationts">
                                        
                                            <?php $__currentLoopData = $exam->questions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $question): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <?php if($question->type == 1): ?>
                                                    <div class="row border p-3 my-2 quation qution-radio">
                                                        <div class="col-12 pt-4">
                                                            <label class="form-label fw-bold " for="name"><span>
                                                                    <?php echo e($loop->iteration); ?> - </span>
                                                                <?php if(isset($question->question_txt)): ?>
                                                                    <?php echo e($question->question_txt); ?>

                                                                <?php endif; ?> *
                                                            </label>
                                                            <div class="options" style="display: block;">
                                                                <div class="row    pt-3 single-option">
                                                                    <?php if(isset($question->options)): ?>
                                                                        <?php $__currentLoopData = $question->options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                            <div
                                                                                class="col-12 col-md-12 fv-plugins-icon-container pt-2 pe-4 mb-1">
                                                                                <input required
                                                                                    class="form-check-input radio row-option mt-0 me-3"
                                                                                    type="radio"
                                                                                    name="answer[<?php if(isset($question->id)): ?><?php echo e($question->id); ?><?php endif; ?>]"
                                                                                    id="exampleRadios-<?php if(isset($option->answer)): ?><?php echo e($option->id); ?><?php endif; ?>"
                                                                                    value="<?php if(isset($option->id)): ?><?php echo e($option->id); ?><?php endif; ?>">
                                                                                <label class=" fw-bold me-3"
                                                                                    for="exampleRadios-<?php if(isset($option->answer)): ?><?php echo e($option->id); ?><?php endif; ?>">
                                                                                    <?php if(isset($option->answer)): ?>
                                                                                        <?php echo e($option->answer); ?>

                                                                                    <?php endif; ?>
                                                                                </label>
                                                                            </div>
                                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                    <?php endif; ?>
                                                                </div>
                                                            </div>
                                                            <div class="btn-delete-quation number-qution mark pt-2">
                                                                <span class=" badge badge-rounded badge-primary light">
                                                                    <?php if(isset($question->mark)): ?>
                                                                        <?php echo e($question->mark); ?>

                                                                    <?php endif; ?> درجات
                                                                </span>
                                                            </div>
                                                        </div>

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

                                        <div class="col-xl-12" style="direction: ltr;">
                                            <button type="submit" class="btn btn-primary me-sm-3 me-1">حفظ </button>
                                        </div>
                                </form>
                            </div>

                        </div>
                    </div>

                </div>

            </div>
        </div>
    </div>
    <!--**********************************
                                            Content body end
                                ***********************************-->


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

<?php $__env->startSection('script'); ?>
    <script src="<?php echo e(asset('/js/expire-exam.js')); ?>"></script>
    <script src="<?php echo e(asset('/vendor/datatables/js/jquery.dataTables.min.js')); ?>"></script>
    <script src="<?php echo e(asset('/js/plugins-init/datatables.init.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Nasser\Desktop\TrainingManagementPlatform\resources\views/exams/page_exam.blade.php ENDPATH**/ ?>