cancel
Showing results for 
Search instead for 
Did you mean: 
bhuggins
Surveyor

Best Way to Bulk Update User Roles?

Jump to solution

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.

1 Solution

Accepted Solutions
vanzandt
Adventurer II

I was going to say, send one sis_import with the new role as active, and then send a second sis_import with original role set as deleted, but then I reread your concern about loosing "the original data concerning when someone was enrolled to begin with as well as some other things." I was curious if the roles were the same base type, if it would hold the original enrollment date, since it only displays the base role on the student detail page within the course.  I tested just manually updating the student role from the People page, to a custom student role we had built, and it looks like even doing it that way established a new enrollment date on their student detail page for the course.  In your testing,  were you able to manually adjust the role and have that enrollment date stick to the original?

View solution in original post

5 Replies
abunag
Surveyor

I have a theory, but I haven't tried it.  Could you run an SIS import with a fresh "diffing_data_set_identifier" with the user's original roles (to get the original roles associated with that diff ID), then run a new SIS import with the same "diffing_data_set_identifier" value with the roles set to your new scheme?  In theory, that should change all the roles instead of just adding a second role to each user.

Thanks Anthony.  That's something I hadn't considered, so I'll have to do some testing.  The fact that it requires all enrollment data to be loaded is mildly terrifying, but it would be a major time savor.

Looks like this won't work for us unfortunately.  We aren't using a standard SIS import system, but instead we're inputing information using calls to the api, which means that there's no diffing_data_set_identifier for us to use. 

Thank you again for the advice though.  If we were using the standard process that would have worked.

vanzandt
Adventurer II

I was going to say, send one sis_import with the new role as active, and then send a second sis_import with original role set as deleted, but then I reread your concern about loosing "the original data concerning when someone was enrolled to begin with as well as some other things." I was curious if the roles were the same base type, if it would hold the original enrollment date, since it only displays the base role on the student detail page within the course.  I tested just manually updating the student role from the People page, to a custom student role we had built, and it looks like even doing it that way established a new enrollment date on their student detail page for the course.  In your testing,  were you able to manually adjust the role and have that enrollment date stick to the original?

View solution in original post

Thanks for pointing that out Todd, I just retested it too and I see what you mean.  This is a part of a very long drawn out project for us, and we must have taken a bad note somewhere along the line.  This is a great example of why a fresh set of eyeballs is always helpful.

Since it seems unavoidable that the date changes, that does free up other options we were intending to avoid because of that.  I am able to still pull up the original enrollment by looking for deleted enrollments, so I'll have to keep that in mind if we ever need to audit.