Converting very old courses with legacy IDs to new split key (opaque key?) ids?

I am working on a migration of an old instance that still has some courses with the legacy ID structure (e.g. org/course_num/course_run instead of course-v1:org+course_num+course_run).

Long ago I thought there was a guide to converting these kinds of courses, but I could not find it. Is anyone aware of a guide like this? Or any alternative ideas. I prefer not to lose the student activity in these courses (there is a lot) but if it’s impossible then it’s impossible.

I don’t think there’s a way to convert these courses, beyond exporting the content and creating new content. Looks like old-style course access was removed in Nutmeg.

AI says this in response to Googling “openedx convert old style course keys” which feels accurate to me:

Open edX does not directly provide a tool to convert old-style course keys (ORG/COURSE/RUN) to the new format (course-v1:ORG+COURSE+RUN). Courses using the old-style keys are stored in a legacy storage service and are not served by the new MFE (Multi-FrontEnd). Instead, you need to create a new course, import content from the old course, and then rename the organization and course number in the new course.

I’ll cc @dave for confirmation though.

Converting the courses from the old modulestore to the newer one always involved import/export like @sarina mentioned, or creating a re-run. Both of those create new course runs with new identifiers, and do not keep any of the old student state.

I think it’s possible that you could rerun the course content and then write a script to bring student state over from the existing tables (e.g. copy entries from courseware_studentmodule and dozens of other tables), but it would be really difficult to make sure you really got everything. I don’t know if anyone’s tried it.

Sorry. :frowning:

Thank you everyone, this does clarify it.