Access Control:
- AI Studio view checks user role: only SCHOOL_ADMIN, SUPER_ADMIN, TEACHER, VICE_PRINCIPAL
- Students and parents see 'Kein Zugriff' (No Access) message
- AI Studio removed from student navigation
- API routes (/api/ai/snapgen, /api/ai/perchance, /api/ai/lesson-plan, /api/ai/agent) enforce role checks
New Features:
- 'Save to Lesson' dialog in Video and Image generation tabs
- Pick Subject > Topic > Lesson from existing curriculum
- Saves AI video/image URL to SubjectLesson record
- Stores prompt, provider, timestamp, and teacher who generated
- Students will see this content in homework and lesson materials
- AI Lesson Plan API route (/api/ai/lesson-plan)
- AI Agent Chat API route (/api/ai/agent) with context-aware system prompts
- SubjectLesson model: Added aiVideoUrl, aiImageUrl, aiThumbnailUrl, aiPrompt, aiProvider, aiGeneratedAt, aiGeneratedBy
- Homework model: Added aiLessonId, aiVideoUrl, aiImageUrl for linking AI content
Navigation:
- Removed duplicate AI Studio entry from teacher nav
- Removed AI Studio from student nav (students can't access)