Overview
Allow course editors to attach files to lessons. Attached files are included as email attachments when the lesson is sent to learners.
Requirements
Backend
- Add a new
LessonAttachment model with a ForeignKey to Lesson, storing the uploaded file
- A lesson can have multiple attachments, but the total size of all attachments must not exceed 15 MB
- Enforce the size limit at the model/API level and return a clear validation error when exceeded
- Update the send lesson command to include all lesson attachments as email attachments
Frontend
- Update the lesson form to allow uploading and managing attachment files (add, remove)
- Display existing attachments when editing a lesson
- Show the total attachment size and enforce the 15 MB limit with a user-friendly error message
Acceptance criteria
Overview
Allow course editors to attach files to lessons. Attached files are included as email attachments when the lesson is sent to learners.
Requirements
Backend
LessonAttachmentmodel with aForeignKeytoLesson, storing the uploaded fileFrontend
Acceptance criteria
LessonAttachmentmodel exists withForeignKeytoLessonand a file field