- Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Overview
Currently, there is no way to duplicate a course in Frappe Learning, not on the same site, and not across sites. Courses are a three-level hierarchy: a Course links to Chapters, which link to Lessons. Lessons contain rich text, embeds, and uploaded file assets. Copying any of this today requires a lot of manual effort. This feature introduces a ZIP-based export and import mechanism that packages an entire course with its structure, content, and assets into a single portable file.
User Story
As a course author, I want to export a complete course as a ZIP file and import it on the same or a different Frappe Learning site, so that I can duplicate or back up courses without manual effort.
ZIP Package Structure
The exported ZIP is self-describing with course.json as the entry point.
| Path | Contents |
|---|---|
course.json | Course metadata, chapter list with sort order (idx), instructor emails |
chapters/chapter_NNN.json | Chapter metadata, lesson list with sort order (idx) |
lessons/lesson_NNN.json | Lesson metadata along with content JSON |
assets/ | All uploaded binary files referenced in lessons, course image, etc |
- Instructor and author references are stored as email addresses inside
course.json. On import, first names are derived from the email prefix if the user doesn't already exist on the target site. - If the lessons have quizzes, assignments, or programming exercises, they will be exported too in their respective folders.
Export
- Triggerable from the Course detail page; produces a ZIP named
course_<name>_<date>.zip - All chapters and lessons are included in correct sort order (
idxpreserved) - Uploaded assets bundled under
assets/, with lesson content paths rewritten to relative references - Embed-only and text-only lessons export correctly with no asset folder required
- Instructor emails included; no passwords or sensitive user data exported
Import
- Recreates the full Course → Chapter → Lesson hierarchy in the correct order
- Assets re-uploaded to the target site's file system; URLs rewritten in lesson content
- Post-import summary shows: chapters created, lessons created, assets uploaded, and any unresolved references
Metadata
Metadata
Assignees
Labels
Type
Projects
Status