fix exam and grading
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user