Copying/Updating Start Here Module

Jump to solution
M_Rhinehart
Community Member

Our institution has a Start Here module that we use in every course offered. We have the master copy in our course template which gets placed in every new course created. Unfortunately, our fall courses have already been created and faculty have begun working on them. We have had to make several significant changes since then to our Start Here module.

Can someone tell me how to create an API so that we can duplicate our updated Start Here pages into all of the courses at once or update them? I am familiar on a very basic level with APIs and can't seem to figure out the logistics of creating what I need.

0 Likes
1 Solution
melodyc_lam
Community Coach
Community Coach

@M_Rhinehart You may want to try blueprinting the start here module into courses. That wouldn't need an API call. At best, you can do it through the UI and at worst, it's a SIS import to make it work (if more than 100 courses). It would be duplicated probably, but you can tell teachers to delete the old Start Here module. Then just dissociate the blueprint and go on with the year 🙂

If you want to do API calls, you'll want to do the following in some kind of script (this replicates the "Copy To" functionality on a module):

1) Call /api/v1/content_migrations  on the target course (the one you want to send the module to)

2024-07-31_16-52-36.png

2) Your payload/body of the request should look something like this:{"migration_type":"course_copy_importer","select":{"modules":["12214721"]},"settings":{"source_course_id":"700125","insert_into_module_id":null,"insert_into_module_type":"modules","insert_into_module_position":null}}{"migration_type":"course_copy_importer","select":{"modules":["12214721"]},"settings":{"source_course_id":"700125","insert_into_module_id":null,"insert_into_module_type":"modules","insert_into_module_position":null}}

Modules contains the module ID(s) that you want to copy over. To get the module ID, just go to the /api/v1/<courseID>/modules and look in the object for the module ID matching the module you want to copy cover.

The source_course_id should be the course ID where your "Start Here" module is in. 

Unfortunately the API documentation isn't specific about how the "selective" import works so I had to go dive in the Dev Console to read off how the object looks like.

Do NOT use the "selective_import" boolean as that acts like the selective import in the Import Course Content page -- where you have to wait to select the items to import.

Hope this helps!

View solution in original post

0 Likes