fadd column to enrollment table
This commit is contained in:
@@ -825,16 +825,12 @@ final class EnrollmentTransitionService
|
||||
private function firstEnrollmentPlacement(array $student, string $targetSchoolYear): array
|
||||
{
|
||||
$grade = $this->classBaseName((string) ($student['registration_grade'] ?? ''));
|
||||
$targetClass = $grade !== '' ? $this->classByName($grade, $targetSchoolYear) : null;
|
||||
$targetSection = is_array($targetClass)
|
||||
? $this->baseSectionForClass((int) ($targetClass['id'] ?? 0), $targetSchoolYear)
|
||||
: null;
|
||||
|
||||
return [
|
||||
'assigned_grade_id' => $targetClass['id'] ?? null,
|
||||
'assigned_grade_name' => $targetClass['class_name'] ?? ($grade !== '' ? $grade : null),
|
||||
'assigned_class_section_id' => $targetSection['class_section_id'] ?? null,
|
||||
'placement_status' => $targetSection === null ? 'manual_class_required' : 'same_class_assigned',
|
||||
'assigned_grade_id' => null,
|
||||
'assigned_grade_name' => $grade !== '' ? $grade : null,
|
||||
'assigned_class_section_id' => null,
|
||||
'placement_status' => 'manual_class_required',
|
||||
'flags' => [],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user