refactor: extract lesson completion logic into shared markLessonComplete method and add course progress tracking to video and quiz responses
This commit is contained in:
parent
ab560809c7
commit
18816c4fb2
2 changed files with 129 additions and 83 deletions
|
|
@ -242,6 +242,8 @@ export interface SaveVideoProgressResponse {
|
|||
video_progress_percentage: number | null;
|
||||
is_completed: boolean;
|
||||
last_watched_at: Date;
|
||||
course_progress_percentage?: number;
|
||||
is_course_completed?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -362,5 +364,7 @@ export interface SubmitQuizResponse {
|
|||
is_correct: boolean;
|
||||
score: number;
|
||||
}[];
|
||||
course_progress_percentage?: number;
|
||||
is_course_completed?: boolean;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue