Files
alrahma_sunday_school/app/Views/administrator/grades.php
T
2026-02-10 22:11:06 -05:00

39 lines
1.7 KiB
PHP

<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4">
<div
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Scores</h1>
<a href="/administrator/scores/create" class="btn btn-primary">Add New Score</a>
</div>
<table class="table table-striped mt-3">
<thead>
<tr>
<th>ID</th>
<th>Student Name</th>
<th>Course</th>
<th>Score</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php if (!empty($scores)): ?>
<?php foreach ($scores as $score): ?>
<tr>
<td><?php echo $score['id']; ?></td>
<td><?php echo $score['student_name']; ?></td>
<td><?php echo $score['course']; ?></td>
<td><?php echo $score['score']; ?></td>
<td>
<a href="/administrator/scores/edit/<?php echo $score['id']; ?>" class="btn btn-warning">Edit</a>
<a href="/administrator/scores/delete/<?php echo $score['id']; ?>" class="btn btn-danger"
onclick="return confirm('Are you sure you want to delete this score record?');">Delete</a>
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="5">No score records found.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</main>