hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import type { HomeworkRosterEntry } from "@/api/client"; |
| 2 | |
| 3 | /** |
| 4 | * The status the grading panel opens with: the saved result, else "missing" |
| 5 | * once the deadline passed with nothing handed in, else "done" only for a |
| 6 | * student who did submit. A non-submitter before the deadline gets "" — the |
| 7 | * grader has to choose, so one quick save never marks them as done. |
| 8 | */ |
| 9 | export function defaultGradeStatus(row: Pick<HomeworkRosterEntry, "result" | "missing" | "submission">): string { |
| 10 | if (row.result?.status) return row.result.status; |
| 11 | if (row.missing) return "missing"; |
| 12 | return row.submission ? "done" : ""; |
| 13 | } |