fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -4,7 +4,6 @@ namespace App\Services\Exams;
use App\Models\ExamDraft;
use App\Models\TeacherClass;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\DB;
class ExamDraftTeacherService
@@ -12,7 +11,8 @@ class ExamDraftTeacherService
public function __construct(
private ExamDraftConfigService $configService,
private ExamDraftFileService $fileService
) {}
) {
}
public function listForTeacher(int $teacherId): array
{
@@ -33,7 +33,7 @@ class ExamDraftTeacherService
}
$legacyExams = [];
if (($context['has_legacy'] ?? false) && ! empty($classSectionIds)) {
if (($context['has_legacy'] ?? false) && !empty($classSectionIds)) {
$legacyExams = DB::table('exam_drafts as ed')
->select('ed.*', 'cs.class_section_name')
->leftJoin('classSection as cs', 'cs.class_section_id', '=', 'ed.class_section_id')
@@ -58,7 +58,7 @@ class ExamDraftTeacherService
];
}
public function store(int $teacherId, array $payload, ?UploadedFile $file): array
public function store(int $teacherId, array $payload, ?\Illuminate\Http\UploadedFile $file): array
{
$context = $this->configService->context();
$schoolYear = (string) ($context['school_year'] ?? '');
@@ -77,7 +77,7 @@ class ExamDraftTeacherService
->where('class_section_id', $classSectionId)
->first();
if (! $assignment) {
if (!$assignment) {
return ['ok' => false, 'message' => 'You are not assigned to the selected class section.'];
}