JFIF  x x C         C     "        } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz        w !1AQ aq"2B #3Rbr{ gilour

File "2aa1185b2c6498644e870001fb63f3ab.php"

Full Path: /home/ambitio2/public_html/storage/framework/views/2aa1185b2c6498644e870001fb63f3ab.php
File size: 6.03 KB
MIME-type: text/html
Charset: utf-8

<style>
    .question {
        min-height: auto !important;
    }
</style>

<div class="result">
    <?php
        $submits = $result->submits ? json_decode($result->submits, true) : [];
        $correct_answers = $result->correct_answer ? json_decode($result->correct_answer, true) : [];
        $wrong_answers = $result->wrong_answer ? json_decode($result->wrong_answer, true) : [];
        $mark_per_question = $quiz->total_mark / $questions->count();
        ?>

    <div class="row mb-3">
        <div class="col-md-6">
            <p><?php echo e(get_phrase('Duration : ')); ?>

                <?php $duration = explode(':', $quiz->duration); ?>
                <?php echo e($duration[0]); ?> <?php echo e(get_phrase('Hour')); ?>

                <?php echo e($duration[1]); ?> <?php echo e(get_phrase('Minute')); ?>

                <?php echo e($duration[1]); ?> <?php echo e(get_phrase('Second')); ?>

            </p>
            <p><?php echo e(get_phrase('Total Mark : ')); ?><?php echo e($quiz->total_mark); ?></p>
            <p><?php echo e(get_phrase('Pass Mark : ')); ?><?php echo e($quiz->pass_mark); ?></p>
        </div>
        <div class="col-md-6">
            <p><?php echo e(get_phrase('Correct Answer : ')); ?><?php echo e(count($correct_answers)); ?></p>
            <p><?php echo e(get_phrase('Wrong Answer : ')); ?><?php echo e(count($wrong_answers)); ?></p>
            <p><?php echo e(get_phrase('Obtained marks')); ?> : <?php echo e(count($correct_answers) * $mark_per_question); ?></p>
            <p><?php echo e(get_phrase('Result : ')); ?>

                <?php if(count($correct_answers)*$mark_per_question >= $quiz->pass_mark): ?>
                    <span class="text-success"><?php echo e(get_phrase('Passed')); ?></span>
                <?php else: ?>
                    <span class="text-danger"><?php echo e(get_phrase('Failed')); ?></span>
                <?php endif; ?>
            </p>
        </div>
    </div>

    <?php $__currentLoopData = $questions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $question): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php
            $given_answer = $question->type == 'true_false' ? $question->answer : implode(', ', json_decode($question->answer, true));
            $user_answers = array_key_exists($question->id, $submits) ? $submits[$question->id] : [];
        ?>

        <div class="result-question mb-4 <?php if($key > 0): ?>  <?php endif; ?>">
            <div class="mb-1 d-flex align-items-center gap-3">
                <span class="serial"><?php echo e(++$key); ?></span>
                <div><?php echo $question->title; ?></div>

                <?php if(in_array($question->id, $correct_answers)): ?>
                    <i class="fi fi-br-check text-success"></i>
                <?php elseif(in_array($question->id, $wrong_answers)): ?>
                    <i class="fi fi-br-cross-small text-danger"></i>
                <?php endif; ?>
            </div>

            <div class="row gap-0">
                <?php if($question->type == 'mcq'): ?>
                    <?php $options = json_decode($question->options, true) ?? []; ?>
                    <?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php $val = $user_answers ? array_search($option, $user_answers) : ''; ?>
                        <div class="col-sm-6">
                            <input class="form-check-input" type="checkbox" value="<?php echo e($option); ?>" <?php if(is_numeric($val)): ?> checked <?php endif; ?> disabled>
                            <label class="form-check-label text-capitalize"><?php echo e($option); ?></label>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php elseif($question->type == 'fill_blanks' || $question->type == 'short_question'): ?>
                    <input type="text" class="form-control tagify" data-role="tagsinput" value="<?php echo e(json_encode($user_answers)); ?>" disabled>
                <?php elseif($question->type == 'true_false'): ?>
                    <div class="col-sm-2">
                        <input class="form-check-input" type="radio" disabled <?php if($user_answers == 'true'): ?> checked <?php endif; ?>>
                        <label class="form-check-label"><?php echo e(get_phrase('True')); ?></label>
                    </div>
                    <div class="col-sm-2">
                        <input class="form-check-input" type="radio" disabled <?php if($user_answers == 'false'): ?> checked <?php endif; ?>>
                        <label class="form-check-label"><?php echo e(get_phrase('False')); ?></label>
                    </div>
                <?php endif; ?>
                <p class="text-capitalize text-success fw-600">
                    <?php echo e(get_phrase('Answer : ')); ?><?php echo e($given_answer); ?>

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

    <div class="row">
        <div class="col-12 d-flex gap-3 justify-content-center">
            <button type="button" class="eBtn gradient border-0 mb-4 d-flex align-items-center gap-2" id="backBtn" onclick="back()"><i class="fi fi-rr-angle-small-left fs-5"></i><?php echo e(get_phrase('Back')); ?></button>
        </div>
    </div>
</div>

<script>
    // back to main
    function back() {
        description.classList.remove('d-none');
        starterContainer.classList.remove('d-none');
        document.querySelector('.result').remove();
    }

    $('.result .tagify:not(.inited)').each(function(index, element) {
        var tagify = new Tagify(element, {
            placeholder: '<?php echo e(get_phrase('Enter your keywords')); ?>'
        });
        $(element).addClass('inited');
    });
</script>
<?php /**PATH G:\Projects\academylmslaravel_running\resources\views/course_player/quiz/result.blade.php ENDPATH**/ ?>