fix exam and grading

This commit is contained in:
root
2026-06-04 13:25:31 -04:00
parent b4e6ac03c5
commit feb6be0610
22 changed files with 1288 additions and 120 deletions
@@ -10,19 +10,19 @@ class ExamDraftResource extends JsonResource
{
return [
'id' => (int) ($this['id'] ?? 0),
'teacher_id' => (int) ($this['teacher_id'] ?? 0),
'teacher_id' => (int) (($this['teacher_id'] ?? $this['author_id'] ?? 0) ?: 0),
'class_section_id' => (int) ($this['class_section_id'] ?? 0),
'class_section_name' => $this['class_section_name'] ?? null,
'semester' => $this['semester'] ?? null,
'school_year' => $this['school_year'] ?? null,
'exam_type' => $this['exam_type'] ?? null,
'draft_title' => $this['draft_title'] ?? null,
'description' => $this['description'] ?? null,
'teacher_file' => $this['teacher_file'] ?? null,
'teacher_filename' => $this['teacher_filename'] ?? null,
'description' => $this['description'] ?? ($this['author_comment'] ?? null),
'teacher_file' => $this['teacher_file'] ?? ($this['author_file'] ?? null),
'teacher_filename' => $this['teacher_filename'] ?? ($this['author_filename'] ?? null),
'status' => $this['status'] ?? null,
'admin_id' => $this['admin_id'] ?? null,
'admin_comments' => $this['admin_comments'] ?? null,
'admin_id' => $this['admin_id'] ?? ($this['reviewer_id'] ?? null),
'admin_comments' => $this['admin_comments'] ?? ($this['reviewer_comments'] ?? null),
'reviewed_at' => $this['reviewed_at'] ?? null,
'final_file' => $this['final_file'] ?? null,
'final_filename' => $this['final_filename'] ?? null,