From ff63567e863e9445a67451e096d1b0535563d568 Mon Sep 17 00:00:00 2001 From: JakkrapartXD Date: Fri, 6 Feb 2026 12:56:50 +0700 Subject: [PATCH] fix: lower video completion threshold from 99% to 95% --- Backend/src/services/CoursesStudent.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Backend/src/services/CoursesStudent.service.ts b/Backend/src/services/CoursesStudent.service.ts index 667ad012..d7c23190 100644 --- a/Backend/src/services/CoursesStudent.service.ts +++ b/Backend/src/services/CoursesStudent.service.ts @@ -942,8 +942,8 @@ export class CoursesStudentService { ? (video_progress_seconds / video_duration_seconds) * 100 : null; - // Auto-complete at >= 99% OR when video_progress_seconds >= video_duration_seconds - const isCompleted = (progressPercentage !== null && progressPercentage >= 99) || + // Auto-complete at >= 95% OR when video_progress_seconds >= video_duration_seconds + const isCompleted = (progressPercentage !== null && progressPercentage >= 95) || !!(video_duration_seconds && video_progress_seconds >= video_duration_seconds); // Save video progress (without marking complete yet)