fix is_active student flag and apply it in all pages
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Successful in 1m17s

This commit is contained in:
root
2026-08-20 12:59:59 -04:00
parent 0a31aa1393
commit bfa343b69f
57 changed files with 820 additions and 240 deletions
+9 -4
View File
@@ -88,15 +88,20 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
</tr>
</thead>
<tbody>
<?php foreach ($students as $index => $student): ?>
<tr>
<tbody>
<?php foreach ($students as $index => $student): ?>
<?php
$rowLocked = student_is_non_active_for_editing($student, $schoolYear ?? null);
$rowLockAttr = $scoresLocked ? $lockAttr : ($rowLocked ? 'readonly aria-disabled="true"' : '');
?>
<tr class="<?= $rowLocked ? 'table-secondary text-muted' : '' ?>">
<td><?= $index + 1 ?></td>
<td><?= esc($student['school_id']) ?></td>
<td>
<a href="#" class="text-decoration-none" data-family-student-id="<?= (int)($student['student_id'] ?? 0) ?>">
<?= esc($student['firstname']) ?>
</a>
<?= student_enrollment_status_button($student, $schoolYear ?? null) ?>
</td>
<td>
<a href="#" class="text-decoration-none" data-family-student-id="<?= (int)($student['student_id'] ?? 0) ?>">
@@ -106,7 +111,7 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
<td>
<input type="number" name="final_score[<?= esc($student['student_id']) ?>][score]"
value="<?= esc($student['score'] ?? '') ?>" class="form-control text-center" min="0" max="100" step="0.01"
placeholder="Enter score (optional)" <?= $lockAttr ?>>
placeholder="Enter score (optional)" <?= $rowLockAttr ?>>
</td>
</tr>
<?php endforeach; ?>