openedx / openedx/openedx-platform

Unit Prerequisites Lost During Course Export/Import

Open
#36,995 4 comments 0 reactions 1 assignee View on GitHub

@haftamuk is already working on this.

Since Jul 12, 2025.

  • #37475 by @haftamuk — open
bug
Dominant language
Python
Stars
8.2k
Forks
4.4k
Avg merge
6d 18h
Merged PRs (30d)
42

Description

Description

When exporting and importing courses in OpenEdX, unit prerequisite settings are not preserved in the export data, resulting in lost prerequisite configurations after course import.

Environment

  • Platform: OpenEdX
  • Authoring Tool Version: 0.1.0
  • Tutor Version: Teak

Image

Exported course:
course.hokfktvz.tar.gz

Steps to Reproduce

  1. Create a course with multiple units in a subsection
  2. Set up prerequisites for units (e.g., Unit 2 requires completion of Unit 1)
    • Navigate to the unit settings
    • Configure prerequisite: "Intro 1" as prerequisite for "Intro 2"
  3. Verify prerequisites are working correctly in the course
  4. Export the course using the course export functionality
  5. Create a new course or clear existing course content
  6. Import the exported course data
  7. Check the unit prerequisite settings in the imported course

Expected Behavior

Unit prerequisite settings should be preserved during export and correctly restored during import, maintaining the same prerequisite relationships as the original course.

Actual Behavior

Unit prerequisites are missing after course import. Units that previously required completion of other units no longer have these prerequisite constraints configured.

Evidence

Based on the course outline shown, "Intro 2" should have "Intro 1" as a prerequisite (as indicated by the lock icon and "Prerequisite: Intro 1" text), but this configuration is lost during the export/import process.

Impact

  • Severity: High - Affects course structure and learning progression
  • Affected Users: Course authors, instructional designers
  • Workaround: Manual reconfiguration of prerequisites after import (time-consuming for courses with many units)

Additional Information

  • This issue was discovered through practical testing of course migration workflows
  • The problem appears to be in the export data structure not including prerequisite metadata
  • Other course elements (content, assignments, etc.) appear to export/import correctly

Possible Areas to Investigate

  1. Export serialization logic for unit prerequisites
  2. OLX format specification for prerequisite data
  3. Import parsing logic for prerequisite relationships
  4. Database schema mapping during export/import operations

Related Documentation

  • [OpenEdX Course Export Documentation]
  • [Unit Prerequisites Configuration Guide]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.