cancel
Showing results for 
Search instead for 
Did you mean: 
cdeville
Learner II

Canvas SIS import statistics!

I noticed this today as I checked the status of an import, so it must have come with the weekend's release. There are now statistics! This does not appear to be documented as of today (I don't see it documented here: SIS Imports - Canvas LMS REST API Documentation ), but an undocumented improvement is better than an undocumented bug, right?

What's so great about statistics? Now, for example, if I upload a course file in diffing mode, I can see the number of courses created or deleted. In the past, I could only see the total number (no-changes, creates, and deletes would just be summed together):

"counts": {
"change_sis_ids": 0,
"accounts": 0,
"terms": 0,
"abstract_courses": 0,
"courses": 3514,
"sections": 0,
"xlists": 0,
"users": 0,
"enrollments": 0,
"admins": 0,
"group_categories": 0,
"groups": 0,
"group_memberships": 0,
"grade_publishing_results": 0,
"user_observers": 0,
"error_count": 0,
"warning_count": 0
},‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Now I can see which out of those actually changed state from active to deleted, for example:

"statistics": {
"total_state_changes": 1,
"Account": {
"created": 0,
"deleted": 0
},
"EnrollmentTerm": {
"created": 0,
"deleted": 0
},
"AbstractCourse": {
"created": 0,
"deleted": 0
},
"Course": {
"created": 1,
"deleted": 0
},
"CourseSection": {
"created": 0,
"deleted": 0
},
"GroupCategory": {
"created": 0,
"deleted": 0
},
"Group": {
"created": 0,
"deleted": 0
},
"Pseudonym": {
"created": 0,
"deleted": 0
},
"CommunicationChannel": {
"created": 0,
"deleted": 0
},
"Enrollment": {
"created": 0,
"deleted": 0
},
"GroupMembership": {
"created": 0,
"deleted": 0
},
"UserObserver": {
"created": 0,
"deleted": 0
},
"AccountUser": {
"created": 0,
"deleted": 0
}
}
},‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Anyone else notice this, and if so, do you have any stories about why this is helpful or not?

2 Replies
matt5
Community Member

Has anyone been able to track down some documentation on these new statistics? We have some guesses what the numbers in each field are representing, but we're not 100% sure on all of them. For example, what exactly does the Pseudonym statistic mean?

We're also seeing cases where the numbers don't quite add up. For example, one of our SIS imports from today showed the following stats:

Course 555 created
Enrollment 579 created
Total State Changes 1135 changed

Everything else was 0. When this happens, it's usually only off by 1. I would guess that this happen 1 out of 10 times. In most cases, the numbers add up perfectly. Does anyone know why that might be?

rob
Instructure
Instructure

Hi  @cdeville  and  @matt5 ,

In the 8-25 release there was a feature added that would do a restore of workflow_states from a sis import. Canvas Release Notes (2018-08-25) 

When that feature was built it made it so we track the items that changed and we have that data so we know what items to restore and to what. Later, a school needed to see which import had deleted several items, and we have the data, so as I was looking for the import I added a few lines of code that I used to find this import into canvas to add statistics to the sis batches. I thought it was useful information for everyone so I pushed it up and it went out in the 10-06 release. It worked for identifying created items and deleted items mostly, but there are several gaps that you have found. I'll go through a few of them. This would not add concluded items or restored items.  This also may double count an item if it did not exist and was created in a deleted state. Another way that these statistics count may be very different from the counts is it is tracking state changes. You could upload a file that will delete one course. Deleting that course would also delete 40 enrollments and 35 group memberships, making the total_state_changes to 76.

What you actually want will be coming in the first release of they year and should be on beta next week. It will include more data and documentation around the statistics in the api documentation.