<?php $__env->startSection('content'); ?>
  <?php
    $subjectResults = [
        ['label' => 'G.K.', 'marks' => $useranswerdetails->gkmarks, 'percentage' => $useranswerdetails->gkpercentage],
        ['label' => 'Science', 'marks' => $useranswerdetails->sciencemarks, 'percentage' => $useranswerdetails->sciencepercentage],
        ['label' => 'Hindi', 'marks' => $useranswerdetails->hindimarks, 'percentage' => $useranswerdetails->hindipercentage],
        ['label' => 'English', 'marks' => $useranswerdetails->englishmarks, 'percentage' => $useranswerdetails->englishpercentage],
        ['label' => 'Maths', 'marks' => $useranswerdetails->mathsmarks, 'percentage' => $useranswerdetails->mathspercentage],
    ];
  ?>

  <div class="card-header">
    <h4>Exam Result Details</h4>
  </div>
  <div class="card-body">
    <?php echo $__env->make('admin.partials.flash-messages', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="result-overview-grid">
      <div class="result-overview-card">
        <span>Assignment</span>
        <strong><?php echo e($assignment?->competitiontitle ?: ($useranswerdetails->competitionassigntitle ?: $useranswerdetails->competitiontitle)); ?></strong>
      </div>
      <div class="result-overview-card">
        <span>Student</span>
        <strong><?php echo e($student->name); ?></strong>
      </div>
      <div class="result-overview-card">
        <span>Total Marks</span>
        <strong><?php echo e($useranswerdetails->totalmarks); ?></strong>
      </div>
      <div class="result-overview-card">
        <span>Total Percentage</span>
        <strong><?php echo e($useranswerdetails->totalpercentage); ?>%</strong>
      </div>
      <div class="result-overview-card">
        <span>Final Result</span>
        <strong class="<?php echo e((int) $useranswerdetails->status === 1 ? 'text-success' : 'text-danger'); ?>">
          <?php echo e((int) $useranswerdetails->status === 1 ? 'Pass' : 'Fail'); ?>

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

    <div class="table-responsive">
      <table class="table table-striped table-hover" id="tableExport" style="width:100%;">
        <thead>
          <tr>
            <th>Subject</th>
            <th>Marks</th>
            <th>Percentage</th>
            <th>Result</th>
          </tr>
        </thead>
        <tbody>
          <?php $__currentLoopData = $subjectResults; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subject): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
              <td><?php echo e($subject['label']); ?></td>
              <td><?php echo e($subject['marks']); ?></td>
              <td><?php echo e($subject['percentage']); ?>%</td>
              <td>
                <?php if((float) $subject['percentage'] >= 40): ?>
                  <span class="badge badge-success">Pass</span>
                <?php else: ?>
                  <span class="badge badge-danger">Fail</span>
                <?php endif; ?>
              </td>
            </tr>
          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
      </table>
    </div>
  </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\examproject\examproject_new\resources\views/admin/school/contest/examreaultdetaiils.blade.php ENDPATH**/ ?>