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:
@@ -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("Работа уже проверена");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user