Found this content helpful? Log in or sign up to leave a like!
Canvas API Sortable Student Name Format Change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have code that fetches a list of students in the course using the following endpoint:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @josh ,
You are correct that sortable_name normally returns last name and first name with a comma in between. Could your data have changed? You might want to try last_name and first_name, just to see if those are giving what you'd expect. According to the Canvas API Documentation, sortable_name should return the name of the user that is normally used for sorting groups of users, such as in a gradebook.
"sortable_name": "Doe, John", Another idea is to log into Canvas as an Admin and verify a user's "Sortable Name" in the UI, which displays on the user's profile page.