add controllers, servoices

This commit is contained in:
root
2026-03-09 02:52:13 -04:00
parent c8de5f7edc
commit d76c871cb7
501 changed files with 34439 additions and 21843 deletions
@@ -0,0 +1,31 @@
<?php
namespace App\Http\Resources\Grading;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class BelowSixtyStudentResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'student_id' => (int) ($this->resource['student_id'] ?? 0),
'school_id' => $this->resource['school_id'] ?? null,
'firstname' => $this->resource['firstname'] ?? null,
'lastname' => $this->resource['lastname'] ?? null,
'class_section_name' => $this->resource['class_section_name'] ?? null,
'homework_avg' => $this->resource['homework_avg'] ?? null,
'project_avg' => $this->resource['project_avg'] ?? null,
'participation_score' => $this->resource['participation_score'] ?? null,
'test_avg' => $this->resource['test_avg'] ?? null,
'ptap_score' => $this->resource['ptap_score'] ?? null,
'attendance_score' => $this->resource['attendance_score'] ?? null,
'midterm_exam_score' => $this->resource['midterm_exam_score'] ?? null,
'final_exam_score' => $this->resource['final_exam_score'] ?? null,
'semester_score' => $this->resource['semester_score'] ?? null,
'comment' => $this->resource['comment'] ?? null,
'status' => $this->resource['status'] ?? null,
];
}
}
@@ -0,0 +1,14 @@
<?php
namespace App\Http\Resources\Grading;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class GradingScoreResource extends JsonResource
{
public function toArray(Request $request): array
{
return $this->resource->toArray();
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Http\Resources\Grading;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class HomeworkTrackingTeacherResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'class_section_id' => (int) ($this->resource['class_section_id'] ?? 0),
'class_id' => $this->resource['class_id'] ?? null,
'class_section_name' => $this->resource['class_section_name'] ?? null,
'teachers' => $this->resource['teachers'] ?? [],
'tas' => $this->resource['tas'] ?? [],
];
}
}