alter the enrollment role of a user via sis import?

Jump to solution
cheikkila
Community Member

This is our first term using Canvas. We are populating sections using the SIS import method, sending csv files with just the changed rows each time (not a full batch update).

For reporting (in CD2 which we haven't set up yet), we will need to distinguish between students who dropped a class during the drop period (we set their status to inactive), and students who withdrew from a class after the drop period. I have created a custom role called Withdrawn_Student, and my plan was to change the role for the student to Withdrawn_Student and set their status to inactive. Then once we have CD2, I'd be able to get grade reports for all active students and withdrawn students. We don't want to set the dropped students to deleted, since sometimes we need to check a dropped student's grades/activity and deleting them makes them invisible in the gradebook/class.
 
The issue is that when I try to change a student's role from student to Withdrawn_Student by importing an enrollments.csv file with the altered row, the student's role in the section isn't changed - the student gets a second role in the section. (wasn't expecting that!!) They are in the section as both student and Withdrawn_Student. 
 
Is there any way to use SIS import to alter the existing role for a user instead of adding a new role?
 

 

Labels (1)
0 Likes
1 Solution
NicoletteStaley
Instructure
Instructure

@cheikkila There are two ways that you can have the student's role changed from student to withdrawn_student with your SIS imports, but which is the better solution depends on if you include ALL enrollments in the imported CSV or just the changed ones (a "pre-diffed" CSV). 

If you are including all enrollments in the enrollments.csv, then you can use Diffing Mode with a diffing_drop_status set to deleted. Then the active student roles would be "missing" from the data and result in the student enrollment being deleted and the withdrawn_student role getting added.

If you are only imported changes to the enrollments, then you would want to list the withdrawn student's enrollment twice in the CSV:  once with a role of student and status of deleted, and once with the role of withdrawn_student and a status of active.

You may want to consider an alternative to the custom role as well:  you could set the status for enrollments that are dropped during the drop period to completed and those dropped later as inactive (or vise versa) as both are still accessible in the gradebook for instructors to view, but inaccessible to students (the option to prevent students from accessing the course after it is completed would need to be enabled to "hide" the course from completed students otherwise students would only have read-only access to the course).

View solution in original post