feat: fix quiz scoring to use Choice model correctness, add YouTube video support to lesson content, and include show_answers_after_completion in quiz data

Update quiz attempt detail scoring to determine correctness from Choice.is_correct instead of StudentAnswer.is_correct and calculate earned score based on correctness. Add YouTube video support to getLessonContent endpoint by checking LessonAttachment for YouTube videos (mime_type 'video/youtube') and building YouTube URLs from video IDs. Ad
This commit is contained in:
JakkrapartXD 2026-02-04 14:19:17 +07:00
parent 827b016114
commit 7e8c8e2532
3 changed files with 36 additions and 11 deletions

View file

@ -158,6 +158,7 @@ export interface LessonContentData {
shuffle_questions: boolean;
shuffle_choices: boolean;
is_skippable: boolean;
show_answers_after_completion: boolean;
questions: {
id: number;
question: MultiLangText;