Commit graph

91 commits

Author SHA1 Message Date
JakkrapartXD
ec67c7c6b6 feat: normalize chapter sort_order to prevent gaps and duplicates in course chapters
Add normalizeChapterSortOrder method to ensure sequential 1-based sort_order values. Update reorderChapter to normalize before reordering and validate new position against chapter count. Call normalization after chapter deletion to fill gaps in remaining chapters.
2026-02-02 16:27:27 +07:00
JakkrapartXD
2b248cad10 feat: normalize lesson sort_order to prevent gaps and duplicates in chapter lessons
Add normalizeLessonSortOrder method to ensure sequential 1-based sort_order values. Update reorderLesson to normalize before reordering and validate new position against lesson count. Call normalization after lesson deletion to fill gaps in remaining lessons.
2026-02-02 16:16:28 +07:00
JakkrapartXD
69e4806831 feat: normalize question sort_order to prevent gaps and duplicates in quiz questions
Add normalizeQuestionSortOrder method to ensure sequential 1-based sort_order values. Update reorderQuestion to normalize before reordering and validate new position against question count. Call normalization after question deletion to fill gaps in remaining questions.
2026-02-02 15:50:23 +07:00
JakkrapartXD
7ac1a5af0a feat: remove published status check when deleting lessons
Remove validation that prevented deletion of published lessons. Lessons can now be deleted regardless of their published status without requiring unpublishing first.
2026-02-02 14:34:17 +07:00
JakkrapartXD
b7e4f45942 feat: add student endpoint for listing course announcements
Add new AnnouncementsStudentController with GET endpoint for students to retrieve course announcements with pagination support. Endpoint requires JWT authentication and validates course enrollment.
2026-02-02 11:49:23 +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
d7f824f353 feat: standardize login response format with code, message, and data wrapper
Update login endpoint to return consistent API response structure with code, message, and data fields. Wrap token, refreshToken, and user data inside a data object to match the standardized response format used across other endpoints.
2026-01-30 17:54:43 +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
bf5d939910 feat: add role-based frontend URL routing for password reset and email verification
Add separate frontend URL environment variables for student and instructor portals. Update password reset and email verification services to route users to the appropriate frontend based on their role (INSTRUCTOR vs STUDENT).
2026-01-30 17:29:08 +07:00
JakkrapartXD
16322454b1 feat: change default is_published value to true for chapters and lessons 2026-01-30 17:16:21 +07:00
JakkrapartXD
10a71c9a15 feat: standardize category update response format with code, message, and data wrapper 2026-01-30 15:23:29 +07:00
JakkrapartXD
14c1222a4e a 2026-01-30 08:02:50 +00:00
JakkrapartXD
babccc4869 feat: add email verification endpoints with token-based verification and SMTP integration 2026-01-30 14:53:50 +07:00
JakkrapartXD
9ed2347843 feat: add certificate generation system with PDF template and Thai font support 2026-01-30 14:14:00 +07:00
JakkrapartXD
344e1e4341 feat: track approval metadata and rejection reason in course status updates 2026-01-30 10:15:43 +07:00
JakkrapartXD
ed8aaf4ec2 refactor: remove thumbnail_url requirement from course creation validator 2026-01-29 17:58:05 +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
0641b2547a refactor: simplify instructor search to query all instructors without course-specific filtering 2026-01-29 16:17:25 +07:00
JakkrapartXD
f4a12c686b feat: Implement instructor search and improve instructor management with email/username lookup and avatar presigned URLs. 2026-01-29 15:52:10 +07:00
JakkrapartXD
07ab43a785 feat: update getCourseById endpoint to return single course response type and improve error handling. 2026-01-28 17:08:44 +07:00
JakkrapartXD
b303c50865 feat: add dedicated thumbnail upload endpoint for courses with old file cleanup and presigned URL generation. 2026-01-28 16:47:08 +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
b28dd410e2 refactor: simplify avatar deletion logic and improve error handling in user service. 2026-01-28 15:01:48 +07:00
JakkrapartXD
cf12ef965e feat: add thumbnail upload support to course creation endpoint with multipart form data handling. 2026-01-28 14:38:11 +07:00
JakkrapartXD
53314dfd7e feat: implement avatar upload functionality with presigned URL support for user profiles and announcement attachments. 2026-01-28 11:49:11 +07:00
JakkrapartXD
470f4a5577 chore: remove outdated API endpoint creation workflow documentation. 2026-01-28 09:47:22 +07:00
JakkrapartXD
d2b3842564 feat: enable file upload support for announcement creation with multipart form data handling. 2026-01-27 16:43:59 +07:00
JakkrapartXD
dd5a8c1cc8 feat: reorder Security decorator in announcements controller for consistency. 2026-01-27 14:36:28 +07:00
JakkrapartXD
52a013f431 feat: add JWT authentication requirement to announcements retrieval endpoint. 2026-01-27 14:23:51 +07:00
JakkrapartXD
baf389643b feat: implement announcement management service with CRUD operations, attachment handling, and role-based access control for courses. 2026-01-27 14:00:20 +07:00
JakkrapartXD
f1a83f479e add workflow 2026-01-27 10:00:29 +07:00
JakkrapartXD
be7348c74d feat: Implement granular API for video upload/update and attachment management with dedicated types and endpoints. 2026-01-26 17:23:26 +07:00
JakkrapartXD
bbfb62093e feat: Introduce announcements service, integrate MinIO for lesson media with presigned URLs, and restrict editing of pending courses. 2026-01-26 15:15:46 +07:00
JakkrapartXD
84e4d478c7 feat: add API endpoint and service logic for reordering quiz questions. 2026-01-26 12:00:59 +07:00
JakkrapartXD
8fc11381ad reorder lesson fix path 2026-01-23 13:33:47 +07:00
JakkrapartXD
5d6cab229f make admin approve api 2026-01-23 13:16:41 +07:00
JakkrapartXD
6acb536aef add filter APPROVED to couse to see olny APPROVED course 2026-01-23 11:29:46 +07:00
JakkrapartXD
6e5a8d01e6 add skill to project 2026-01-23 10:53:48 +07:00
JakkrapartXD
5e7d265ffb add filter to course 2026-01-23 10:37:30 +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
dcf0385a87 protech 2026-01-22 16:22:33 +07:00
JakkrapartXD
5c2b5d55aa update api chapterlesson 2026-01-22 15:56:56 +07:00
JakkrapartXD
bb79e6aedc feat: Remove createLessonWithFiles endpoint and its associated imports and types. 2026-01-22 10:22:53 +07:00
JakkrapartXD
fc3e2820cc feat: Introduce dedicated instructor and student controllers for chapter and lesson management, including quiz questions. 2026-01-21 16:52:54 +07:00
JakkrapartXD
9a7eb50d17 feat: Add student and instructor chapter/lesson controllers and refactor instructor lesson file upload endpoints with TSOA. 2026-01-21 16:52:38 +07:00
JakkrapartXD
cad3f276f5 refactor: add type assertions for request parameters and explicitly type multer middleware. 2026-01-20 10:03:06 +00:00
JakkrapartXD
04e2da43c4 feat: Implement lesson creation with file uploads (video, attachments) and quiz data, integrating MinIO for storage. 2026-01-20 16:51:42 +07:00
JakkrapartXD
2a461a1e4f feat: add listCourseResponse and getCourseResponse interfaces for course API responses. 2026-01-20 14:18:58 +07:00