Skip to content

Commit 3bd16cf

Browse files
Update src/pages/instructor/grading.tsx
Co-authored-by: Copilot <[email protected]>
1 parent 81f8a24 commit 3bd16cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pages/instructor/grading.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ const InstructorGrading: PageWithLayout = () => {
9696
// Remove graded submission from list
9797
setSubmissions(submissions.filter((s) => s.id !== submissionId));
9898
// Clear form data
99-
setScore({ ...score, [submissionId]: 0 });
100-
setFeedback({ ...feedback, [submissionId]: "" });
99+
const { [submissionId]: _, ...remainingScores } = score;
100+
setScore(remainingScores);
101+
const { [submissionId]: __, ...remainingFeedback } = feedback;
102+
setFeedback(remainingFeedback);
101103
} else {
102104
setError(data.error || "Failed to grade submission");
103105
}

0 commit comments

Comments
 (0)