feat: course package import and export#2286
Conversation
lms
|
||||||||||||||||||||||||||||||
| Project |
lms
|
| Branch Review |
course-package-import
|
| Run status |
|
| Run duration | 00m 31s |
| Commit |
|
| Committer | Jannat Patel |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
1
|
Upgrade your plan to view test results. | |
| View all changes introduced in this branch ↗︎ | |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2286 +/- ##
===========================================
+ Coverage 44.61% 48.09% +3.48%
===========================================
Files 149 150 +1
Lines 5877 6508 +631
===========================================
+ Hits 2622 3130 +508
- Misses 3255 3378 +123 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a ZIP-based course package export/import flow to make it easier to duplicate an LMS course (including its structure and related records) across sites, and wires this into the LMS API + UI.
Changes:
- Introduces backend export/import implementation for course ZIP packages and exposes it via whitelisted API methods.
- Adds frontend UI to import courses via ZIP (modal) and export from the course settings menu.
- Updates automated tests (Python + Cypress) to cover the new UI/API behavior.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| lms/lms/course_import_export.py | New core implementation for course ZIP export/import logic. |
| lms/lms/api.py | Exposes new import/export API endpoints and includes minor parameter renames. |
| lms/lms/test_api.py | Adds tests for course export/import ZIP behavior. |
| lms/lms/doctype/lms_quiz/lms_quiz.json | Adjusts Quiz title constraints (unique removed). |
| frontend/src/pages/Courses/CourseImportModal.vue | Adds ZIP upload/import modal. |
| frontend/src/pages/Courses/CourseDetail.vue | Adds Export action in course settings dropdown. |
| frontend/src/pages/Courses/Courses.vue | Adds menu option to open ZIP import modal. |
| frontend/src/utils/index.js | Adds ZIP validation to shared file validation helper. |
| frontend/src/components/Modals/Event.vue | Updates request param name to match backend rename. |
| cypress/e2e/course_creation.cy.js | Updates selectors/flow for new settings dropdown UI. |
| lms/lms/utils.py | Removes stray whitespace. |
| lms/lms/doctype/lms_course/lms_course.py | Removes stray whitespace. |
| lms/lms/doctype/course_lesson/course_lesson.json | Doctype metadata updates (field order / naming rule metadata). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@Mergifyio backport main-hotfix |
❌ No backport have been createdDetails
Git reported the following error: |
There was no easy way to duplicate a course from one site to another. There are just too many doctypes involved. So duplicating a course required a lot of manual effort.
This feature simplifies duplicating a course from one site to another. You can now export a course as a zip. This zip contains all the course metadata along with all its chapters, lessons, assessments, and assets.
You can then import this zip package on another site with the Learning app installed. This process would create the course along with all its dependencies on the new site.
course.package.mp4
Closes #2225