fix parent pages and teachers and admin
API CI/CD / Validate (composer + pint) (push) Successful in 3m8s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Test (PHPUnit) (push) Failing after 6m5s
API CI/CD / Security audit (push) Failing after 52s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped

This commit is contained in:
root
2026-07-09 13:56:22 -04:00
parent 21c9322127
commit 02ba2fe6b6
34 changed files with 2306 additions and 99 deletions
@@ -8,6 +8,7 @@ use App\Models\SemesterScore;
use App\Models\TeacherSubmissionNotificationHistory;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class TeacherSubmissionReportService
{
@@ -25,6 +26,11 @@ class TeacherSubmissionReportService
} catch (\Throwable) {
$teacherClassSupportsSemester = false;
}
try {
$studentClassSupportsSemester = Schema::hasColumn('student_class', 'semester');
} catch (\Throwable) {
$studentClassSupportsSemester = false;
}
$assignmentQuery = DB::table('teacher_class as tc')
->select([
@@ -99,10 +105,15 @@ class TeacherSubmissionReportService
continue;
}
$studentIds = DB::table('student_class')
$studentQuery = DB::table('student_class')
->where('class_section_id', $classSectionId)
->where('semester', $semester)
->where('school_year', $schoolYear)
->where('school_year', $schoolYear);
if ($studentClassSupportsSemester && $semester !== '') {
$studentQuery->where('semester', $semester);
}
$studentIds = $studentQuery
->pluck('student_id')
->map(fn ($id) => (int) $id)
->filter()