Add 'approve without feedback' button for homework review

Curators/admins can mark a submission APPROVED (and complete the lesson)
without writing feedback. The student sees 'ДЗ принято ✓' and can no
longer resubmit. No email is sent on silent approval.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 16:10:29 +05:00
parent a9869bfac8
commit 2436f77de5
4 changed files with 108 additions and 4 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ export async function submitHomework(
include: { feedbacks: true },
});
if (existing?.feedbacks && existing.feedbacks.length > 0) {
if ((existing?.feedbacks && existing.feedbacks.length > 0) || existing?.status === "APPROVED") {
throw new Error("Работа уже проверена");
}