Commit graph

17 commits

Author SHA1 Message Date
JakkrapartXD
df750723af feat: add quiz attempt logic to getlessonContent
- Check allow_multiple_attempts setting when returning quiz data
- If allow_multiple_attempts is false AND user has attempted:
  - Return only quiz metadata and latest score
  - Do NOT return questions
- If allow_multiple_attempts is true OR user has not attempted:
  - Return full quiz with questions
  - Include latest_attempt data if exists
- Add latest_attempt field to quiz response with score and attempt info
2026-02-11 15:01:58 +07:00
JakkrapartXD
ff63567e86 fix: lower video completion threshold from 99% to 95% 2026-02-06 12:59:48 +07:00
JakkrapartXD
108f1b73f2 feat: integrate audit logging across authentication, course management, and user operations
Add comprehensive audit trail tracking by integrating auditService throughout the application. Track user authentication (LOGIN, REGISTER), course lifecycle (CREATE, APPROVE_COURSE, REJECT_COURSE, ENROLL), content management (CREATE/DELETE Chapter/Lesson), file operations (UPLOAD_FILE, DELETE_FILE for videos and attachments), password management (CHANGE_PASSWORD, RESET_PASSWORD), user role updates (UPDATE
2026-02-05 17:35:37 +07:00
JakkrapartXD
2728af9efe feat: increase video auto-completion threshold from 90% to 99% progress 2026-02-04 16:48:05 +07:00
JakkrapartXD
7e8c8e2532 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
2026-02-04 14:19:17 +07:00
JakkrapartXD
80d7372dfa feat: add instructor endpoints for student progress tracking and quiz score management
Add four new instructor endpoints: getEnrolledStudents to view all enrolled students with progress, getQuizScores to view quiz scores for all students in a lesson, getQuizAttemptDetail to view detailed quiz attempt for a specific student, and searchStudents to search enrolled students by name/email/username. Add getQuizAttempts endpoint for students to retrieve their own quiz attempt history. All endpoints include
2026-02-02 18:02:19 +07:00
JakkrapartXD
18b8f4501f feat: add is_skippable field to Quiz model with default value true
Add is_skippable boolean field to Quiz schema, update quiz creation and update logic to handle the new field, and include it in student course content responses. Update seed data and type definitions accordingly.
2026-02-02 11:17:20 +07:00
JakkrapartXD
4ff57555a2 feat: conditionally hide correct_answers count based on show_answers_after_completion setting
Update quiz submission response to respect the show_answers_after_completion setting by conditionally including the correct_answers count. When show_answers_after_completion is false, correct_answers is now undefined instead of being exposed.
2026-01-30 17:51:33 +07:00
JakkrapartXD
18816c4fb2 refactor: extract lesson completion logic into shared markLessonComplete method and add course progress tracking to video and quiz responses 2026-01-29 17:17:15 +07:00
JakkrapartXD
24c37df4ef refactor: reorder searchInstructors endpoint and fix role code to uppercase INSTRUCTOR, add lesson completion tracking on quiz pass 2026-01-29 16:39:33 +07:00
JakkrapartXD
10821d093c feat: add presigned URL generation for course thumbnails across all course services. 2026-01-28 15:31:21 +07:00
JakkrapartXD
6acb536aef add filter APPROVED to couse to see olny APPROVED course 2026-01-23 11:29:46 +07:00
JakkrapartXD
c982ab2c05 add check quizz for student 2026-01-22 17:30:35 +07:00
JakkrapartXD
76f8ab120a add quastion to api 2026-01-22 17:16:52 +07:00
JakkrapartXD
5c2b5d55aa update api chapterlesson 2026-01-22 15:56:56 +07:00
JakkrapartXD
0308995d8e feat: Implement lesson access control logic including enrollment, prerequisite, and quiz completion checks. 2026-01-19 17:08:06 +07:00
JakkrapartXD
4c9ad1cea7 feat: Implement student course management functionalities and standardize multi-language text types across course and category definitions. 2026-01-19 14:14:59 +07:00