<?php $__env->startSection('title', 'My Results'); ?>
<?php $__env->startSection('page-title', 'My Results'); ?>
<?php $__env->startSection('sidebar-nav'); ?>
<div class="nav-item"><a href="<?php echo e(route('student.dashboard')); ?>"><i class="bi bi-grid"></i> Dashboard</a></div>
<div class="nav-item"><a href="<?php echo e(route('student.results')); ?>"><i class="bi bi-bar-chart"></i> My Results</a></div>
<div class="nav-item"><a href="<?php echo e(route('student.fees')); ?>"><i class="bi bi-cash"></i> Fee Balance</a></div>
<div class="nav-item"><a href="<?php echo e(route('student.attendance')); ?>"><i class="bi bi-calendar-check"></i> Attendance</a></div>
<div class="nav-item"><a href="<?php echo e(route('student.assignments')); ?>"><i class="bi bi-file-earmark-text"></i> Assignments</a></div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="page-header"><div><h1>My Results</h1></div></div>

<?php $__empty_1 = true; $__currentLoopData = $exams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $exam): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<div class="card" style="margin-bottom:20px;">
    <div class="card-header">
        <h5><?php echo e($exam->name); ?> &mdash; <?php echo e($exam->term->name); ?></h5>
        <?php
            $totalPoints = $exam->marks->sum('points');
            $count = $exam->marks->count();
            $mean = $count > 0 ? round($totalPoints / $count, 1) : 0;
        ?>
        <span class="badge badge-success">Mean: <?php echo e($mean); ?> pts</span>
    </div>
    <div class="table-wrap">
        <table>
            <thead><tr><th>Subject</th><th>Score</th><th>Grade</th><th>Points</th><th>Remarks</th></tr></thead>
            <tbody>
                <?php $__currentLoopData = $exam->marks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mark): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($mark->subject->name); ?></td>
                    <td><?php echo e($mark->score); ?>/<?php echo e($mark->out_of); ?></td>
                    <td><span class="badge badge-info"><?php echo e($mark->grade); ?></span></td>
                    <td><?php echo e($mark->points); ?></td>
                    <td><?php echo e($mark->remarks); ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<div class="card"><div class="card-body" style="text-align:center;padding:40px;color:var(--gray);">No published results yet</div></div>
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\cbe\resources\views\student\results.blade.php ENDPATH**/ ?>