Migrating from LearnDash to Open edX

Did anyone else migrate to Open edX from WP LearnDash? I am curious to learn more about your experience during the transition if you don’t mind replying. Thanks in advance!

2 Likes

Very interesting question! I am still looking for colleagues with such experience

Yes this thread is 2 years old but wondering if you made any progress? We are in process of migrating it as well.. and any insight or tips would be highly appreciated.

Hello, I did tried such migration recently, what I tried was to dump the database and wrote some python code to insert into OpenEdx mongodb, but that didn’t work very well (courses don’t show up in the LMS or the CMS).

Since my customer does not have too many courses and their priority were a couple of short courses I opted to create those manually first, but I still have in my queue to research how to automate the migration.

We were able to migrate hundreds of courses from LearnDash to Open edX by writing a script that translated the course structure from one system to the other. It pulled from the LearnDash database and wrote to Open edX not directly to the database but rather using the course apis. We started by creating a new course, then building xblocks to fill in the course hierarchy structure. The final step was to programmatically publish the course as well.

To achieve this translation, we created custom mapping implementations that translated different content types from the original LD shape to the new OEX shape including carrying over the relevant metadata, etc. That included lessons, topics, videos, pdfs, quizzes (this is the most involved), etc.

Unfortunately our scripts built in very specific assumptions based on our usage of LearnDash and plans for Open edX, so it is not a script that would be applicable for others or that we feel comfortable making open source.

1 Like

thanks Ernesto.

Amazing Jeff. Anything you can share which might help us? Even the xblocks to full course hierarchy?

Hey Jeff, thank you for sharing your experience. Are you in the OEX slack? I’d like to bug you with questions if I get stuck. Anyways the idea of using the courses API is helpful, I’ll start experimenting that path to make the migration.

Here are some of the OEX functions we used:

  • cms.djangoapps.contentstore.views.course.create_new_course
  • openedx.core.djangoapps.models.course_details.CourseDetails.update_about_item
  • xmodule.modulestore.django.modulestore.create_library
  • xmodule.modulestore.django.modulestore.create_child
  • xmodule.modulestore.django.modulestore.publish

Regarding the OEX course hierarchy:

  • A course has multiple sections (aka chapter)
  • Each section has one or more subsections (aka sequential)
  • Each subsection has one or more units (aka vertical)
  • Each unit has one or more content xblocks (html, video, etc.)

So after you have created the new course, you then construct the hierarchy using the modulestore’s create_child to add the various layers of the hierarchy by passing the appropriate parent each time. The data from the WordPress database is used to populated the appropriate attributes for each xblock.

1 Like

that is amazing and thanks for the detailed explaination.

@Jeff_Cohen - just wanted to confirm.. after you added the courses via api.. did those courses got added to meilisearch? or we have to do something else for it to re-index?

Good question. I don’t know the answer since we don’t use meilisearch or any built in search features.