add projet

This commit is contained in:
root
2026-03-05 12:29:37 -05:00
parent 8d1eef8ba8
commit 23b7db1107
9109 changed files with 1106501 additions and 73 deletions
+45
View File
@@ -0,0 +1,45 @@
<?php
namespace App\Services;
use Illuminate\Support\Facades\Log;
class SemesterScoreService
{
public function updateStudentScores(array $data, string $semester, string $schoolYear): void
{
Log::info('SemesterScoreService placeholder update', [
'student_id' => $data['student_id'] ?? null,
'class_section_id' => $data['class_section_id'] ?? null,
'semester' => $semester,
'school_year' => $schoolYear,
]);
// TODO: Implement actual score recalculation logic.
}
/**
* Update scores for multiple students
* @param array $studentInfo Array of student info arrays, each containing at least student_id and class_section_id
*/
public function updateScoresForStudents(array $studentInfo): void
{
if (empty($studentInfo)) {
return;
}
foreach ($studentInfo as $student) {
if (!isset($student['student_id']) || !isset($student['class_section_id'])) {
continue;
}
try {
$this->updateStudentScores($student, $student['semester'] ?? '', $student['school_year'] ?? '');
} catch (\Throwable $e) {
Log::error('Failed to update scores for student', [
'student_id' => $student['student_id'] ?? null,
'error' => $e->getMessage(),
]);
}
}
}
}