fix logic and tests, update docker CI file
This commit is contained in:
@@ -9,7 +9,7 @@ class ClassPreparationRosterService
|
||||
public function getClassSectionStudentCounts(string $schoolYear, string $semester, bool $limitToSemester): array
|
||||
{
|
||||
$query = DB::table('student_class as sc')
|
||||
->select('sc.class_section_id, COUNT(DISTINCT sc.student_id) AS student_count', false)
|
||||
->selectRaw('sc.class_section_id, COUNT(DISTINCT sc.student_id) AS student_count')
|
||||
->join('students as s', 's.id', '=', 'sc.student_id')
|
||||
->where('s.is_active', 1)
|
||||
->where('sc.school_year', $schoolYear);
|
||||
@@ -24,7 +24,7 @@ class ClassPreparationRosterService
|
||||
public function getStudentCountForSection(string $schoolYear, string $semester, bool $limitToSemester, string $classSectionId): int
|
||||
{
|
||||
$query = DB::table('student_class as sc')
|
||||
->select('COUNT(DISTINCT sc.student_id) AS cnt', false)
|
||||
->selectRaw('COUNT(DISTINCT sc.student_id) AS cnt')
|
||||
->join('students as s', 's.id', '=', 'sc.student_id')
|
||||
->where('s.is_active', 1)
|
||||
->where('sc.class_section_id', $classSectionId)
|
||||
|
||||
Reference in New Issue
Block a user