From 04e8377dab926b0e2d7bd58b8aa2eadc10acbf36 Mon Sep 17 00:00:00 2001 From: dmitriylaukhin Date: Tue, 16 Jun 2026 12:22:44 +0500 Subject: [PATCH] Show hint on lessons with pending homework or quiz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lessons with homework/quiz have no manual complete button — they auto-complete on submission. Before submission nothing was shown, leaving students unsure how to progress. Add a muted hint. Co-Authored-By: Claude Opus 4.8 --- .../courses/[slug]/lessons/[lessonId]/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/(student)/courses/[slug]/lessons/[lessonId]/page.tsx b/src/app/(student)/courses/[slug]/lessons/[lessonId]/page.tsx index 65c78f0..e18ebf7 100644 --- a/src/app/(student)/courses/[slug]/lessons/[lessonId]/page.tsx +++ b/src/app/(student)/courses/[slug]/lessons/[lessonId]/page.tsx @@ -241,6 +241,17 @@ export default async function LessonPage({ params }: Props) { {!isAdmin && (lesson.homework || lesson.quiz) && isCompleted && ( )} + {/* У уроков с ДЗ/тестом нет ручной кнопки — урок засчитывается по факту сдачи. + Пока ничего не сдано, подсказываем студенту, как пройти урок. */} + {!isAdmin && (lesson.homework || lesson.quiz) && !isCompleted && ( +

+ {lesson.homework && lesson.quiz + ? "Сдайте домашнее задание или пройдите тест, чтобы урок засчитался" + : lesson.homework + ? "Сдайте домашнее задание, чтобы пройти урок" + : "Пройдите тест, чтобы завершить урок"} +

+ )} {nextLesson ? (