add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
@@ -13,27 +13,27 @@ class ClassSectionQueryService
->leftJoin('classes', 'classSection.class_id', '=', 'classes.id')
->select('classSection.*', 'classes.class_name');
if (! empty($filters['search'])) {
$term = '%'.strtolower((string) $filters['search']).'%';
if (!empty($filters['search'])) {
$term = '%' . strtolower((string) $filters['search']) . '%';
$query->where(function ($q) use ($term) {
$q->whereRaw('LOWER(classSection.class_section_name) LIKE ?', [$term])
->orWhereRaw('LOWER(classes.class_name) LIKE ?', [$term]);
});
}
if (! empty($filters['class_id'])) {
if (!empty($filters['class_id'])) {
$query->where('classSection.class_id', (int) $filters['class_id']);
}
if (! empty($filters['school_year'])) {
if (!empty($filters['school_year'])) {
$query->where('classSection.school_year', (string) $filters['school_year']);
}
if (! empty($filters['semester'])) {
if (!empty($filters['semester'])) {
$query->where('classSection.semester', (string) $filters['semester']);
}
if (! empty($filters['with_students'])) {
if (!empty($filters['with_students'])) {
$query->whereExists(function ($sub) use ($filters) {
$sub->selectRaw('1')
->from('student_class as sc')
@@ -41,7 +41,7 @@ class ClassSectionQueryService
->whereColumn('sc.class_section_id', 'classSection.class_section_id')
->where('s.is_active', 1);
if (! empty($filters['school_year'])) {
if (!empty($filters['school_year'])) {
$sub->where('sc.school_year', (string) $filters['school_year']);
}
});