I need to change the Canvas sub-account for a batch of courses. Is there a way to do this through SIS import or the API? Thanks. I'm a bit new to this.
@CynthiaEdwards1
It is possible with both methods (I've done both!)
Preferably, you would use a SIS import to do this if your courses have a SIS ID, with the courses.csv format and changing the 'account_id' to match the correct subaccount SIS ID.
You can follow these instructions -- please try it out in your BETA instance first before you do it in your live instance, just in case there are any issues.
1) Make sure your subaccount has a SIS ID (go to Settings in the subaccount and give it one if it doesn't have one)
2) Go to the account where these courses live -> go to Settings -> Reports tab, then generate a SIS export of Courses (this makes it super easy to get the correctly formatted file and also not accidentally change any other attributes of the course)
3) Delete any courses that you don't want to change and then change the 'account_id' to match the target subaccount SIS ID
4) Save and upload the SIS import.
If your courses DO NOT have a SIS ID, you'll need to use the API (update a course). If you need sample code for this in Python, let me know.
@CynthiaEdwards1 We are using the SIS Import to reorganize all of our sub-accounts, but often need to use the API for some edge cases or research ahead of time.
@melodyc_lam If you have a demo script available to assist in the process, I would like to take a look. Anything that can help move the project along is always incredibly appreciated! (And, it would also dovetail very nicely with our internal clean up of old courses that live in accounts that are non-credit bearing and thus have no SIS, making the course status "deleted" very piecemeal.)
Hi melodyc_lam,
I am trying to use SIS import to reorganize our courses from one-subaccount to another. I am looking at your instruction#2 and wondering which reports on the admin I should download? is it the course.csv inside the provisioning report? or the SIS export report? Thanks! - Ernest
@ErnestChan The SIS Export Courses.csv will be the easiest, especially, from a specific sub account if that is what you're targeting. You can remove unecessary columns you don't use for provisioning if you want. The provisioning report would require removing the canvas_id for each column type. You might also consider whether you need to check include deleted objects if you want to empty a sub account, and if you have courses that do not have an SIS ID the provisioning report would be helpful to get a list of canvas_course_id's that don't have one, to manually fix… back to @melodyc_lam's comment that you'll need to use the API to add an SIS ID or to move the sub account for those.
https://developerdocs.instructure.com/services/canvas/sis/file.sis_csv#courses.csv
@ErnestChan Reports → SIS Export → Choose the term and then check off the box for Courses.csv to get the Courses report.
@cgaudreau Hey, this is a little late, but here's a script to "archive" courses based off a SIS Export report; it pulls the report directly from Canvas, processes it locally, then writes the result to a new file that then I can upload as a SIS Import. I don't have code to upload the file back through the SIS import system since the code was designed for beta usage but that can also be done through API calls so that you can build something that is fully automated.
Thanks for your wonderful information Robert. You mentioned that if we have courses that do not have SIS ID the provisioning report would be helpful to get a list of canvas_course_id's that don't have one to manually fix them. Could you explain this point more? In our school we have plenty of courses which do not created by SIS and do not have a SIS ID. The Canvas support team said we have to manually put a SIS ID to those courses before running courses.csv report if we would like to use SIS import to reassign course subaccount. The other alternative for this task is to use Canvas API with course ID. Thanks.
Hi @ErnestChan,
Based on your needs, you have a couple of options. If you just need to move some courses, maybe one time and be done with it, you could use the API to update the account_id for each of those courses. If you need to or have a desire to move the courses to another account, and have control of them through SIS Imports in the future, to rename them or move them, or update any of the other settings available through SIS Imports courses.csv, then, you can just add a unique sis_course_id to those courses, and then manage additional and future tasks through csv.
account_id
sis_course_id
Either way would start by getting that list of canvas_course_id's from the export report, and using the API endpoint for updating a course.
https://developerdocs.instructure.com/services/canvas/resources/courses#method.courses.update
If you have a favorite programming language, then you can choose how to loop through an array or csv file for the canvas_course_ids you need to update. Otherwise, you could use something like Postman to loop through a collection (csv file) and update the necessary value with the API. Here is some info on using Postman with CanvasAPI, although the screenshots might be a bit dated, the details should work.
Some more:
Canvas Data Services sent out an alert that a course was concluded (because the course was concluded) and the status of each user in the UI is set to complete, however, the enrollments API endpoint shows the status of each user in the course as active. Is this a common issue? Have I misinterpreted how the individual…
How can one track Canvas Media use without having the reports available from Canvas Studio? Checking API endpoints and the Data 2 schema, there do not seem to be dedicated Canvas Media endpoints. Am I missing some? A method I've considered is using the body field of the wiki_pages table, as this contains the html code of…
Hello, I'm trying to utilize an API call to pull completed certificates and was hoping to download and store the certs as a backup. I can successfully run the API call but it will not allow me to view the certificate unless I access the URL while signed into an account where it's "my" cert. Is there a permissions setting…
UI for weekly progression idea that rest in the Schedule tab of the **K-12 UI** of Canvas it's incomplete and I really would not take it and push it into instance but I am going to post it here because in the past people like @James && @robotcars || @Steve_25 have had terrific input in the past... maybe w/their eyes and…
I have a new React + Flask webapp. It has its own login for users to start using the app. I have added this as an external tool in Canvas. What I want initially is to see of canvas users can start using the webapp without having to login if they click on the external tool link in a canvas course. I have 2 methods…