Are you talking about the right side of your image? If so, I don't see a random order, I see alphabetical order.

Alphabetically, "Session 10" comes before "Session 2". The way to alphabetize is to start with the first letter and start comparing letter by letter until you can make a decision about which one comes first. The "Session " (including the space) are identical, so the first character that's different is the "1" or the "2". Alphabetizing doesn't even get to the "0" in the "10" because it makes its decision based on the "1" and the "2", and "1" comes before "2" does.

What you're wanting to happen is for Canvas to treat numbers like numbers in the App.

One kludge is to number the assignments with leading 0's 01, 02, 03, 04, ..., 09, 10, 11, 12, 13, etc. Another option is to put an extra space in front of the ones that are single digits. "Session 1" (that has two spaces). The second option makes it not quite line up, but doesn't have the ugliness of leading 0's.

Are you talking about the right side of your image? If so, I don't see a random order, I see alphabetical order.

Alphabetically, "Session 10" comes before "Session 2". The way to alphabetize is to start with the first letter and start comparing letter by letter until you can make a decision about which one comes first. The "Session " (including the space) are identical, so the first character that's different is the "1" or the "2". Alphabetizing doesn't even get to the "0" in the "10" because it makes its decision based on the "1" and the "2", and "1" comes before "2" does.

What you're wanting to happen is for Canvas to treat numbers like numbers in the App.

One kludge is to number the assignments with leading 0's 01, 02, 03, 04, ..., 09, 10, 11, 12, 13, etc. Another option is to put an extra space in front of the ones that are single digits. "Session 1" (that has two spaces). The second option makes it not quite line up, but doesn't have the ugliness of leading 0's.

Even though James Jones is 100 percent correct, this is an issue with the mobile app. It should be showing you the same order on mobile and web. Also, even though putting the assignments in alphabetical order for undated will help, they can get mixed back up for various reasons when assignments are overdue, upcoming, and past. I suggest you leave feedback inside the app explaining your issue so it can be documented (and hopefully fixed).

You can do this by going to Profile > Help > Report a problem - inside the app.

Does anyone know how to sort assignments in alphabetical order to begin with? Is it done thru API calls? When I add a new assignment in Canvas, it automatically puts it at the bottom of the assignment list and we then have to manually move it into the correct order.

Manual positioning is the intended and supported way to sort assignments.

That said, the when you drag and item on the assignments page, it makes a non-API POST call to /courses/:course_id/assignment_groups/:assignment_group_id/reorder

Here is one from my Concepts assignment group, which has assignment group id = 3581639

POST /courses/2235010/assignment_groups/3581639/reorder

The payload is an order field consisting of a string that contains a comma separated list of the desired order. I've truncated the list here, but it's long enough to show what is happening.

order=16209950,16209962,16209955,16209961,16209966,16209960,16209951

You get back a response that contains an array of assignment IDs called order and a property reorder that is true. This represents the new order.

Note that I said that's a non-API call. Sometimes you stumble across an undocumented API call, but I wasn't able to in this case. If this was supported by the teacher's app, then there would be a better chance of it being available through the API, but I don't have the app loaded to know if it supports that.

While it's not API based, someone could write some JavaScript that would add a menu item to each assignment group like this (sorry, I couldn't find a good icon for sorting).

Then, when the menu item was clicked, it would sort the items in that assignment group however the person wanted them sorted and make the internal call to save the order. That sorting could look for numbered items like "HW 1.2" and "HW 1.10" and sort them numerically if needed.

By the time you would get around to clicking, all of the information that you need is available on the page itself, so you wouldn't need to make any external API calls to fetch the list of assignments. However, the information is not available when the page initially loads; the lists of assignments and assignment groups are loaded dynamically via AJAX. That means that you would need to wait until the content was available on the page before you could add the menu item.