add assessment feature
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 49s
Tests / PHPUnit (push) Successful in 1m36s

This commit is contained in:
root
2026-09-10 06:44:24 -04:00
parent ac19226bf0
commit b5e719382d
31 changed files with 1712 additions and 65 deletions
@@ -91,6 +91,7 @@ $selectedYear = trim((string)($selectedYear ?? ''));
<th>Allergies</th>
<th>Photo Consent</th>
<th>Registration Date</th>
<th style="min-width: 170px;">Assessment</th>
<th style="min-width: 220px;">Action</th>
</tr>
</thead>
@@ -179,6 +180,20 @@ $selectedYear = trim((string)($selectedYear ?? ''));
<td><?= esc($student['allergies'] ?? '') ?></td>
<td><?= !empty($student['photo_consent']) ? 'Yes' : 'No' ?></td>
<td><?= esc($regDisp) ?></td>
<td>
<?php $studentAssessment = ($assessmentByStudent ?? [])[(int)$student['id']] ?? null; ?>
<?php if (!$studentAssessment): ?>
<form method="post" action="<?= site_url('administrator/assessments/students/' . $student['id'] . '/start') ?>"><?= csrf_field() ?><button class="btn btn-sm btn-outline-primary">Assign Assessment</button></form>
<?php elseif (in_array($studentAssessment['status'], ['not_started', 'in_progress'], true)): ?>
<a class="btn btn-sm btn-outline-secondary" href="<?= site_url('administrator/assessments/students/' . $student['id']) ?>">View Status</a>
<div class="small text-muted mt-1"><?= esc(ucwords(str_replace('_', ' ', $studentAssessment['status']))) ?></div>
<?php elseif ($studentAssessment['status'] === 'completed'): ?>
<a class="btn btn-sm btn-warning" href="<?= site_url('administrator/assessments/review/' . $studentAssessment['id']) ?>">Review</a>
<?php else: ?>
<a class="btn btn-sm btn-success" href="<?= site_url('administrator/assessments/results/' . $studentAssessment['id']) ?>">View Results</a>
<div class="small text-muted mt-1">Reviewed</div>
<?php endif; ?>
</td>
<td class="d-flex flex-wrap gap-2">
<!-- Contact Modal Trigger -->
<button class="btn btn-warning btn-sm" data-bs-toggle="modal" data-bs-target="#<?= $modalIdContact ?>">