feat: increase video auto-completion threshold from 90% to 99% progress

This commit is contained in:
JakkrapartXD 2026-02-04 16:48:05 +07:00
parent 6b1abf630f
commit 2728af9efe

View file

@ -930,8 +930,8 @@ export class CoursesStudentService {
? (video_progress_seconds / video_duration_seconds) * 100
: null;
// Auto-complete at >= 90% OR when video_progress_seconds >= video_duration_seconds
const isCompleted = (progressPercentage !== null && progressPercentage >= 90) ||
// Auto-complete at >= 99% OR when video_progress_seconds >= video_duration_seconds
const isCompleted = (progressPercentage !== null && progressPercentage >= 99) ||
!!(video_duration_seconds && video_progress_seconds >= video_duration_seconds);
// Save video progress (without marking complete yet)