fix the enrollement-carryover balance
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
<th>School ID</th>
|
||||
<th>Age</th>
|
||||
<th>New Student</th>
|
||||
<th>Make Up Exam</th>
|
||||
<th>Registered Class</th>
|
||||
<th>Current Class</th>
|
||||
<th>Actual Status</th>
|
||||
@@ -101,6 +102,15 @@
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<!-- Make-up Exam -->
|
||||
<td class="text-center">
|
||||
<?php if (($student['make_up_exam'] ?? 'No') === 'Yes'): ?>
|
||||
<span class="badge bg-warning text-dark">Yes</span>
|
||||
<?php else: ?>
|
||||
<span class="badge bg-secondary">No</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<!-- Registered Class -->
|
||||
<td><?= esc(trim((string)($student['registration_grade'] ?? '')) !== '' ? (string)$student['registration_grade'] : '-') ?></td>
|
||||
|
||||
@@ -191,7 +201,7 @@
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="11">No students available.</td>
|
||||
<td colspan="12">No students available.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
@@ -389,8 +399,8 @@
|
||||
|
||||
// Disable sort/search on interactive columns (status select, assign select)
|
||||
columnDefs: [
|
||||
{ targets: [9, 10], orderable: false, searchable: false },
|
||||
{ targets: [0, 1, 2, 3, 4, 5, 6, 7, 8], render: function(data, type) {
|
||||
{ targets: [10, 11], orderable: false, searchable: false },
|
||||
{ targets: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], render: function(data, type) {
|
||||
if (type === 'filter' || type === 'sort' || type === 'type') {
|
||||
return stripHtml(data);
|
||||
}
|
||||
@@ -450,7 +460,7 @@
|
||||
}
|
||||
const CLASS_COL_INDEX = findColIndexByHeader('Current Class'); // was index 4
|
||||
const STATUS_COL_INDEX = findColIndexByHeader('Actual Status'); // was index 5
|
||||
const STATUS_SELECT_COL_INDEX = findColIndexByHeader('Update Enrollment Status');
|
||||
const STATUS_SELECT_COL_INDEX = findColIndexByHeader('Update Status');
|
||||
const ASSIGN_COL_INDEX = findColIndexByHeader('Assign Class');
|
||||
|
||||
/* ===== Helpers ===== */
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user