AnsweredAssumed Answered

Best Way to Bulk Update User Roles?

Question asked by Brett Huggins on Jan 24, 2018
Latest reply on Jan 25, 2018 by Brett Huggins

This is going to be a bit of a build up, but for the tldr; this question's subject line works.


We've created a new set of user roles on our Canvas instances, and part of the project will be to update historical enrollments to our new scheme.  I've been digging into how to do this, and so far I've found a few dead ends. 

SIS import will put users in the new role, but it doesn't overwrite the old role, so users end up having two roles in a course.  Pushing enrollments with the api have the same behavior.  I could use the api to remove the old enrollment after adding the new enrollments, but I don't want to loose the original data concerning when someone was enrolled to begin with as well as some other things.

After running into those issues I've moved onto the idea of grabbing fellow employees here for a role update party.  By that I mean we manually go through courses and use the update role option in the people menu.  Students are remaining the same, so this is a somewhat manageable approach for us, but certainly not ideal.  The new issue related to that is that we always have "Users can only participate in the course between these dates" activated, and that means on old courses we don't have the update role option.  I've been unable to find anyway to bulk turn off and on that setting, so I'm now looking at using a script to add 10 years to the end date of all courses, we do the role updates, then running a script to remove 10 years from all course end dates.


Before we commit a lot of man-hours to going through this approach it seems like a good idea to reach out to the community to see if anyone has any better ideas.  Any tips, advice, links to scripts that someone else made, are very appreciated.