fix is_active student flag and apply it in all pages
This commit is contained in:
@@ -61,13 +61,17 @@
|
||||
<?php foreach ($students as $student): ?>
|
||||
<?php
|
||||
$sid = (int) ($student['student_id'] ?? 0);
|
||||
$sectionName = (string) ($student['class_section_name'] ?? '');
|
||||
$className = (string) ($student['class_name'] ?? '');
|
||||
$sectionLabel = $className !== '' ? ($className . ' — ' . $sectionName) : $sectionName;
|
||||
?>
|
||||
<tr>
|
||||
$sectionName = (string) ($student['class_section_name'] ?? '');
|
||||
$className = (string) ($student['class_name'] ?? '');
|
||||
$sectionLabel = $className !== '' ? ($className . ' — ' . $sectionName) : $sectionName;
|
||||
$rowLocked = student_is_non_active_for_editing($student, $schoolYear ?? null);
|
||||
?>
|
||||
<tr class="<?= $rowLocked ? 'table-secondary text-muted' : '' ?>">
|
||||
<td><?= esc($student['school_id'] ?? '') ?></td>
|
||||
<td><?= esc($student['firstname'] ?? '') ?></td>
|
||||
<td>
|
||||
<?= esc($student['firstname'] ?? '') ?>
|
||||
<?= student_enrollment_status_button($student, $schoolYear ?? null) ?>
|
||||
</td>
|
||||
<td><?= esc($student['lastname'] ?? '') ?></td>
|
||||
<td><?= esc($sectionLabel ?: '—') ?></td>
|
||||
<td>
|
||||
@@ -76,9 +80,10 @@
|
||||
class="form-control form-control-sm"
|
||||
min="0"
|
||||
max="100"
|
||||
step="1"
|
||||
value=""
|
||||
placeholder="0-100">
|
||||
step="1"
|
||||
value=""
|
||||
<?= $rowLocked ? 'readonly aria-disabled="true"' : '' ?>
|
||||
placeholder="0-100">
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -154,13 +159,17 @@
|
||||
<tbody>
|
||||
<?php foreach ($detailRows as $row): ?>
|
||||
<?php
|
||||
$sectionName = (string) ($row['class_section_name'] ?? '');
|
||||
$className = (string) ($row['class_name'] ?? '');
|
||||
$sectionLabel = $className !== '' ? ($className . ' — ' . $sectionName) : $sectionName;
|
||||
?>
|
||||
<tr>
|
||||
$sectionName = (string) ($row['class_section_name'] ?? '');
|
||||
$className = (string) ($row['class_name'] ?? '');
|
||||
$sectionLabel = $className !== '' ? ($className . ' — ' . $sectionName) : $sectionName;
|
||||
$rowLocked = student_is_non_active_for_editing($row, $schoolYear ?? null);
|
||||
?>
|
||||
<tr class="<?= $rowLocked ? 'table-secondary text-muted' : '' ?>">
|
||||
<td><?= esc($row['school_id'] ?? '') ?></td>
|
||||
<td><?= esc($row['firstname'] ?? '') ?></td>
|
||||
<td>
|
||||
<?= esc($row['firstname'] ?? '') ?>
|
||||
<?= student_enrollment_status_button($row, $schoolYear ?? null) ?>
|
||||
</td>
|
||||
<td><?= esc($row['lastname'] ?? '') ?></td>
|
||||
<td><?= esc($sectionLabel ?: '—') ?></td>
|
||||
<td><?= esc($row['score'] ?? '') ?></td>
|
||||
|
||||
Reference in New Issue
Block a user