Get Assignment % of Overall value using API

Jump to solution
MichaelWinger
Community Member

Hi, is there any way to get the "% of Overall" field of an assignment with the API (see screenshot). I did not see this field in the documentation. Thanks.

 

 

Labels (1)
0 Likes
1 Solution
James
Community Champion

@MichaelWinger 

I'm a teacher, admin, and developer. I know Canvas pretty well (except the mobile apps). I have to embarrassingly admit I'm not familiar with that screen. Can you share where you're finding that? If it's in the Canvas web interface, then I can double check what I'm about to write.

I'm going to go with a "no", but hold out a slim possibility that Canvas might have updated things since I last deep dived into this issue.

The API documentation isn't always complete, so the lack of it being there isn't necessary definitive. I do know that grade data is based off of submissions. The client (web or app) downloads the submission information and then calculates the scores and grades. None of the information about which assignments are dropped are included, the client calculates those. There is a mathematical paper referenced in the source code about how to determine which assignments to drop, but it doesn't come from the API. Canvas obviously keeps the scores in the database and is able to calculate a grade without using a client. The REST API can deliver the current and final grades in the course, but any information about scores is usually calculated in the client. The client needs to do all those calculations as changes to the gradebook don't refetch all the grades and percentages, they are recalculated in the client.

GraphQL adds a gradesConnection that will return the grades for each of the assignment groups, but that's not for individual assignments. The REST API didn't have that functionality. Even when grades are fetched through GraphQL instead the REST API, they still just give the scores and then do the calculations in the browser.

I have not seen anywhere in my API explorations that would return what percentage of a grade a particular assignment is. I've not looked for it specifically, but I have done a lot of looking for other things that aren't there.  But then I've also not seen that screen before, either. If I knew where it was I might be able to check the API call being made, but I really don't expect it to be there.

View solution in original post

0 Likes