feat: add mentorship assignments and peer review enhancements

- Create `mentorship_assignments` table with relevant fields and indexes.
- Add `peer_review_settings` table for lesson-specific peer review configurations.
- Enhance `peer_reviews` and `course_submissions` tables with additional fields for instructor reviews and final scores.
- Implement My Notes page to display user annotations with delete functionality.
- Create Lesson Annotations component for managing notes with editing and deletion capabilities.
- Develop Mentor Panel component to display mentor and mentee information.
- Add Course Mentorships page for assigning mentors to students with modal for selection.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-28 12:23:22 -04:00
parent 553036cb58
commit e88fd571f0
25 changed files with 4043 additions and 327 deletions
@@ -0,0 +1,19 @@
-- Fase 41-B: Anotaciones Privadas en Lecciones
CREATE TABLE IF NOT EXISTS lesson_annotations (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID NOT NULL,
lesson_id UUID NOT NULL,
organization_id UUID NOT NULL,
course_id UUID NOT NULL,
content TEXT NOT NULL,
-- JSON libre: { "type": "timestamp", "value": 42.5 } | { "type": "scroll", "value": 0.35 }
position_data JSONB,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_lesson_annotations_user_lesson
ON lesson_annotations (user_id, lesson_id);
CREATE INDEX IF NOT EXISTS idx_lesson_annotations_user_org
ON lesson_annotations (user_id, organization_id);