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)