fix teacher page
This commit is contained in:
@@ -114,6 +114,7 @@ class ScoreDashboardService
|
||||
'homework' => $this->normalizeScore($scoreRow->homework_avg),
|
||||
'quiz' => $this->normalizeScore($scoreRow->quiz_avg),
|
||||
'project' => $this->normalizeScore($scoreRow->project_avg),
|
||||
'participation' => $this->normalizeScore($scoreRow->participation_score),
|
||||
'midterm_exam' => $this->normalizeScore($scoreRow->midterm_exam_score),
|
||||
'final_exam' => $this->normalizeScore($scoreRow->final_exam_score),
|
||||
'attendance' => $this->normalizeScore($scoreRow->attendance_score),
|
||||
@@ -125,6 +126,24 @@ class ScoreDashboardService
|
||||
unset($student);
|
||||
|
||||
$classSection = ClassSection::query()->where('class_section_id', $classSectionId)->first();
|
||||
$missingOkMap = [
|
||||
'ptap_comment' => MissingScoreOverride::getOverridesMap($classSectionId, $semesterLabel, $schoolYear, 'ptap_comment'),
|
||||
];
|
||||
if (strtolower($semesterLabel) === 'fall') {
|
||||
$missingOkMap['midterm_comment'] = MissingScoreOverride::getOverridesMap(
|
||||
$classSectionId,
|
||||
$semesterLabel,
|
||||
$schoolYear,
|
||||
'midterm_comment'
|
||||
);
|
||||
} elseif (strtolower($semesterLabel) === 'spring') {
|
||||
$missingOkMap['final_comment'] = MissingScoreOverride::getOverridesMap(
|
||||
$classSectionId,
|
||||
$semesterLabel,
|
||||
$schoolYear,
|
||||
'final_comment'
|
||||
);
|
||||
}
|
||||
|
||||
return [
|
||||
'students' => $students,
|
||||
@@ -133,6 +152,7 @@ class ScoreDashboardService
|
||||
'semester' => $semesterLabel,
|
||||
'school_year' => $schoolYear,
|
||||
'scoresLocked' => GradingLock::isLocked($classSectionId, $semesterLabel, $schoolYear),
|
||||
'missing_ok_map' => $missingOkMap,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user