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
+20 -13
View File
@@ -85,12 +85,17 @@ if (empty($schoolYears) && $schoolYear !== '') {
}
$studentName = trim((string)($row['firstname'] ?? '') . ' ' . (string)($row['lastname'] ?? ''));
$studentLabel = $studentName !== '' ? $studentName : 'N/A';
$isClosed = ($row['status'] ?? 'Open') === 'Closed';
?>
$studentLabel = $studentName !== '' ? $studentName : 'N/A';
$isClosed = ($row['status'] ?? 'Open') === 'Closed';
$rowLocked = student_is_non_active_for_editing($row, $schoolYear ?? null);
$rowClass = trim($scoreClass . ' ' . ($rowLocked ? 'table-secondary text-muted' : ''));
?>
<tr class="<?= esc($scoreClass) ?>">
<td><?= esc($studentLabel) ?></td>
<tr class="<?= esc($rowClass) ?>">
<td>
<?= esc($studentLabel) ?>
<?= student_enrollment_status_button($row, $schoolYear ?? null) ?>
</td>
<td><?= esc($row['class_section_name'] ?? '—') ?></td>
<td class="text-center">
@@ -124,9 +129,10 @@ if (empty($schoolYears) && $schoolYear !== '') {
name="school_year"
value="<?= esc((string)$schoolYear) ?>">
<select name="status"
class="form-select form-select-sm"
style="width:110px;">
<select name="status"
class="form-select form-select-sm"
<?= $rowLocked ? 'disabled aria-disabled="true"' : '' ?>
style="width:110px;">
<option value="Open" <?= ($row['status'] ?? 'Open') === 'Open' ? 'selected' : '' ?>>
Open
</option>
@@ -137,12 +143,13 @@ if (empty($schoolYears) && $schoolYear !== '') {
<input type="text"
name="note"
class="form-control form-control-sm"
style="width:140px;"
placeholder="Note (optional)"
value="<?= esc((string)($row['note'] ?? '')) ?>">
class="form-control form-control-sm"
style="width:140px;"
placeholder="Note (optional)"
<?= $rowLocked ? 'readonly aria-disabled="true"' : '' ?>
value="<?= esc((string)($row['note'] ?? '')) ?>">
<button type="submit" class="btn btn-sm btn-outline-secondary">
<button type="submit" class="btn btn-sm btn-outline-secondary" <?= $rowLocked ? 'disabled' : '' ?>>
Update
</button>
</form>