fix the enrollement-carryover balance
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 49s
Tests / PHPUnit (push) Successful in 1m21s

This commit is contained in:
root
2026-09-09 21:40:01 -04:00
parent 2d5b151234
commit 36e8ffe56d
12 changed files with 1365 additions and 39 deletions
+49 -3
View File
@@ -199,7 +199,30 @@
<?php else: ?>
<ul class="mb-0">
<?php foreach ($blockers as $finding): ?>
<li><strong><?= esc($finding['title']) ?>:</strong> <?= esc($finding['detail']) ?></li>
<li>
<strong><?= esc($finding['title']) ?>:</strong> <?= esc($finding['detail']) ?>
<?php if (($finding['students'] ?? []) !== []): ?>
<ul class="mt-1 mb-2">
<?php foreach ($finding['students'] as $student): ?>
<?php
$studentId = (int) ($student['student_id'] ?? 0);
$studentName = trim((string) ($student['student_name'] ?? ''));
$studentLabel = $studentName !== '' ? $studentName : 'Student #' . $studentId;
$studentDetails = array_values(array_filter([
trim((string) ($student['school_id'] ?? '')) !== '' ? 'School ID: ' . trim((string) $student['school_id']) : '',
trim((string) ($student['class_section_name'] ?? '')) !== '' ? 'Class: ' . trim((string) $student['class_section_name']) : '',
]));
?>
<li>
<a href="#promotion-student-<?= $studentId ?>"><?= esc($studentLabel) ?></a>
<?php if ($studentDetails !== []): ?>
<span class="text-muted"> — <?= esc(implode('; ', $studentDetails)) ?></span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
@@ -328,7 +351,7 @@
}
$ageSepOne = $ageBySchoolYearSecondSeptember($row);
?>
<tr>
<tr id="promotion-student-<?= (int) ($row['student_id'] ?? 0) ?>">
<td><?= esc($row['student_name'] ?? ('Student #' . (int) ($row['student_id'] ?? 0))) ?></td>
<td><?= esc($row['school_id'] ?? '') ?></td>
<td><?= esc($row['class_section_name'] ?? '') ?></td>
@@ -501,7 +524,30 @@
<div class="fw-semibold mb-2">Resolve these blockers before the year can be closed.</div>
<ul class="mb-0">
<?php foreach ($blockers as $finding): ?>
<li><strong><?= esc($finding['title']) ?>:</strong> <?= esc($finding['detail']) ?></li>
<li>
<strong><?= esc($finding['title']) ?>:</strong> <?= esc($finding['detail']) ?>
<?php if (($finding['students'] ?? []) !== []): ?>
<ul class="mt-1 mb-2">
<?php foreach ($finding['students'] as $student): ?>
<?php
$studentId = (int) ($student['student_id'] ?? 0);
$studentName = trim((string) ($student['student_name'] ?? ''));
$studentLabel = $studentName !== '' ? $studentName : 'Student #' . $studentId;
$studentDetails = array_values(array_filter([
trim((string) ($student['school_id'] ?? '')) !== '' ? 'School ID: ' . trim((string) $student['school_id']) : '',
trim((string) ($student['class_section_name'] ?? '')) !== '' ? 'Class: ' . trim((string) $student['class_section_name']) : '',
]));
?>
<li>
<a href="#promotion-student-<?= $studentId ?>" data-bs-dismiss="modal"><?= esc($studentLabel) ?></a>
<?php if ($studentDetails !== []): ?>
<span class="text-muted"> — <?= esc(implode('; ', $studentDetails)) ?></span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>