Skip to content

Instantly share code, notes, and snippets.

@clintonb
Created February 26, 2015 15:41
Show Gist options
  • Save clintonb/7617e2d618625ce21743 to your computer and use it in GitHub Desktop.
Save clintonb/7617e2d618625ce21743 to your computer and use it in GitHub Desktop.
Script to print all course IDs and the instance type of the course ID
# Get the courses from modulestore
from xmodule.modulestore.django import modulestore
courses = modulestore().get_courses()
# Loop through the ids and print the IDs and types
for course in courses:
print "{}, {}".format(course.id, type(course.id))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment