add test batches

This commit is contained in:
root
2026-06-08 23:45:55 -04:00
parent c792b8be05
commit 8d4d610b82
1480 changed files with 22587 additions and 10762 deletions
@@ -8,7 +8,9 @@ use App\Models\StudentClass;
class StudentStatusService
{
public function __construct(private StudentConfigService $configService) {}
public function __construct(private StudentConfigService $configService)
{
}
public function setActive(int $studentId, bool $isActive, ?int $userId = null): array
{
@@ -17,7 +19,7 @@ class StudentStatusService
$schoolYear = (string) ($context['school_year'] ?? '');
$student = Student::query()->find($studentId);
if (! $student) {
if (!$student) {
return ['ok' => false, 'message' => 'Student not found.'];
}
@@ -34,7 +36,7 @@ class StudentStatusService
->when($schoolYear !== '', fn ($q) => $q->where('school_year', $schoolYear))
->first();
if (! $hasCurrentClass) {
if (!$hasCurrentClass) {
$lastClass = StudentClass::query()
->where('student_id', $studentId)
->orderByDesc('updated_at')
@@ -57,7 +59,7 @@ class StudentStatusService
$classLabel = ClassSection::getClassSectionNameBySectionId($restoreClassId);
if ($classLabel) {
$message .= ' Class assignment restored to '.$classLabel.'.';
$message .= ' Class assignment restored to ' . $classLabel . '.';
}
} else {
$message .= ' No class assignment found for the current term.';