diff --git a/README.md b/README.md index 3b56da3..59c7dcf 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ OpenCCB is a high-performance, microservices-based Learning Management System (L - **LMS Service (Port 3002)**: Student experience, course consumption, and enrollment. - **Shared Library**: Core models and authentication logic. - **Database**: PostgreSQL (shared/isolated schemas). -- **Studio (Frontend)**: Next.js application for instructors and admins. +- **Studio (Frontend)**: Next.js application with a block-based **Activity Builder** for instructors. +- **Asset Storage**: Persistent local storage for native video/audio uploads. ## Getting Started @@ -80,5 +81,10 @@ curl -X POST http://localhost:3002/enroll \ -d '{"course_id": "YOUR_COURSE_ID"}' ``` -## Audit Logging Every mutation in the CMS (Create Course/Module/Lesson) is automatically recorded in the `audit_logs` table for compliance and debugging. + +## Features +- **Block-Based Activity Builder**: Create lessons using text, media, and interactive quiz blocks. +- **Native File Uploads**: Drag-and-drop video/audio uploads with persistence. +- **Playback Constraints**: Limit how many times students can view specific media items. +- **Dynamic Reordering**: (Coming Soon) Organize content blocks with a single click. diff --git a/roadmap.md b/roadmap.md index fa70b58..22c3c3c 100644 --- a/roadmap.md +++ b/roadmap.md @@ -10,12 +10,13 @@ ## Phase 2: Core CMS Features (Current Focus) - [/] Course Outline Editor (Modules & Lessons). -- [ ] File Upload System (Video/Images/Docs). -- [ ] Interactive Content (Quizzes/Rubrics). +- [x] File Upload System (Video/Audio/Native Assets). +- [/] Interactive Content (**Activity Builder Refinement**). + - [ ] Block Reordering (Move Up/Down). + - [ ] Rich Text Editor Integration. + - [ ] Quiz Refinements (True/False, Multi-Response). - [ ] Service-to-Service Communication (CMS -> LMS sync). -integration for videos, documents, and images. -- [ ] **Video Player**: Integrated premium video player for lessons. -- [ ] **Interactivity**: Quizzes, activities, and rubrics implementation. +- [x] **Video Player**: Integrated premium video player with playback limits. - [ ] **Full Studio UI**: Drag-and-drop course builder. ## Phase 3: Authentication & Security diff --git a/web/studio/src/app/courses/[id]/lessons/[lessonId]/page.tsx b/web/studio/src/app/courses/[id]/lessons/[lessonId]/page.tsx index 140c2b7..2f2c9bb 100644 --- a/web/studio/src/app/courses/[id]/lessons/[lessonId]/page.tsx +++ b/web/studio/src/app/courses/[id]/lessons/[lessonId]/page.tsx @@ -77,6 +77,15 @@ export default function LessonEditor({ params }: { params: { id: string; lessonI setBlocks(blocks.map(b => b.id === id ? { ...b, ...updates } : b)); }; + const moveBlock = (index: number, direction: 'up' | 'down') => { + const newBlocks = [...blocks]; + const targetIndex = direction === 'up' ? index - 1 : index + 1; + if (targetIndex < 0 || targetIndex >= newBlocks.length) return; + + [newBlocks[index], newBlocks[targetIndex]] = [newBlocks[targetIndex], newBlocks[index]]; + setBlocks(newBlocks); + }; + if (loading) return