1

I am trying to find a way to export users from OpenEDX platform. Anyone knows how to import and export users platform?

Thanks

  • I did some searches to find a better way to do the import/export. Apparently, EDX does not have a feature to export users from the system same as courses. I had to do the user data migration manually. Then I courses I exported using the course export command end imported all courses to the new system. – Manoj Lasantha Feb 08 '17 at 03:29

1 Answers1

2

There is no user import/export feature/function in Open edX. You can do two things.

  1. Export users from Django but not import
  2. Dump and restore from Database

For the first one(export as CSV),

>>> from django.contrib.auth.models import User
>>> with open('myfile.csv', 'w') as csv:
...     for user in User.objects.all():
...         d = '%s, %s, %s,\n' % (user.username, user.last_name, user.first_name)
...         csv.write(d)
Isanka Wijerathne
  • 3,746
  • 3
  • 26
  • 34