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
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user