fix is_active student flag and apply it in all pages
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user