Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
We make use of the Canvas API to list all users. I use the link HTTP header to run through the list of pages to call. I have had a problem with the following GET requests:
The same user appears at the end of page 39 and then at the start of page 40.
The user details are the same (I have obfuscated the example due to it being student details):
{
"id": 5041,
"name": "[NAME]",
"sortable_name": "[NAME]",
"short_name": "[NAME]",
"sis_user_id": "[GUID]",
"integration_id": "[STUDENT_ID]",
"sis_login_id": "[STUDENT_ID]",
"sis_import_id": null,
"login_id": "[STUDENT_ID]",
"email": "[EMAIL ADDRESS]"
}
Has anyone else seen this happening? I add the users into a C# Dictionary by the login details, which of course is causing a problem if the user has already been output once.
I haven't been able to replicate this particular issue on our instance, tried a few things.
When you search for the individual user, do you see one or two? For example, if you get rid of the page parameter and add &search_term=5401.
And what about looking at 99 items per page? Just to make sure this particular student isn't at the very bottom or very top. He'll probably be in the middle of page 40.
Otherwise, someone from Instructure would probably need to assist since it may be some issue with how the API is querying for this students' data.
Good luck!
Try running a provisioning report for users. Does that report also have 2 line for that user?
Check out this discussion: Submissions API not returning all submissions? as this sounds like a very similar issue.
Also check out this response to How is the To-Do List sorted? where I detail some of the problems: https://community.canvaslms.com/message/10177?commentID=10177#comment-10192
We noticed a pattern in our data, there are two users (both students) with the same name. However, only one of the IDs appears (5041), the same student on both pages of the query.
I suspect I am going to have to bring this up with support directly.
We have the same thing.
In our case we often have users with multiple logins. A Student login and an employee login. Both associated with the same SIS_ID.
Since the SIS_ID has to be globally unique. The second login for the account shows a blank SIS_ID but is still listed as
ID: 5041
And it does look like duplicate data. But the API and the provisioning report pulls one line per login, not one line per User.
The two users with the same name are separate users, they have different SIS_ID and Login_id. They just happen to have the same forename and surname. This is quite common with our student base and also has the potential to cross over with our staff population.
As @James Jones mentioned in his post, it sounds like an error in the way Canvas executes its sorting algorithms on SQL side of things.
I've made a direct request to support for this matter, so I will let everyone know the outcome of that discussion.
Just to let everyone know, my case with Canvas has been updated and I'm waiting for the fix to be applied to the Beta instance for testing. Hopefully this means it might resolve other paging issues too.
To participate in the Instructure Community, you need to sign up or log in:
Sign In