fix test issues
This commit is contained in:
@@ -2348,13 +2348,17 @@ final class EnrollmentTransitionService
|
||||
$overridableFailed = array_values(array_diff($failedCodes, self::NON_OVERRIDABLE_RULE_CODES));
|
||||
$recordedCodes = json_decode((string) ($exception['bypassed_rule_codes_json'] ?? ''), true);
|
||||
$recordedCodes = is_array($recordedCodes) ? array_values(array_filter(array_map('strval', $recordedCodes))) : [];
|
||||
$applicableCodes = array_values(array_intersect($overridableFailed, $recordedCodes));
|
||||
if ($applicableCodes === []) {
|
||||
return;
|
||||
}
|
||||
|
||||
$evaluation['admin_exception'] = [
|
||||
'id' => (int) $exception['id'],
|
||||
'reason_code' => (string) ($exception['reason_code'] ?? ''),
|
||||
'source_school_year' => $sourceSchoolYear,
|
||||
'status' => (string) ($exception['status'] ?? ''),
|
||||
'bypassed_rule_codes' => $overridableFailed !== [] ? $overridableFailed : $recordedCodes,
|
||||
'bypassed_rule_codes' => $applicableCodes,
|
||||
];
|
||||
$evaluation['decision'] = self::DECISION_EXCEPTION_ELIGIBLE;
|
||||
$evaluation['parent_enrollment_allowed'] = true;
|
||||
|
||||
Reference in New Issue
Block a user