Hi Canvas Developers & Canvas Admins
Does anyone know if there an API call where I can set "treat ungraded as zero" as a parameter to false?
Adam, I’m not sure of the answer to your question, but I have directly shared this question with the two Community groups you tagged.
Hope someone one can help with the answer!
I'm like 95% sure there isn't an API call for this. I think it's more of like a user setting or something. I tried monitoring the network traffic when you click the button and it does not make an API call to Canvas like a lot of other things do. Like when you mute an assignment on the grade book screen, you can see the API call that gets sent. When I click on Treat Ungraded as Zero, I do not see anything.
Thanks Matt, I suspected as much. It sounds like knowing how to monitor the network traffic could be a really useful thing... any chance you could point me towards something so I can learn more about that? I have on several occasions spent fruitless time on inspecting pages!
Yeah, I just use the Chrome Inspect tools. If you move over to the network tab, it shows you what calls get made when you click on stuff. Here is a screenshot of what it shows when I click to mute an assignment:
If you scroll down that headers tab you can see a lot of cool stuff. The Response tab also let's you see the JSON response object for the call.
I don't really know what I'm doing, I've just kind of figured things out as I go and you pick up some of these tricks. Honestly I probably learned most of this watching people debug stuff at Hack Night during InstructureCon.
This is a very useful trick I often use. To close the loop with the question, the call that's being made there is not an API call, it's a call to an internal, undocumented call. You have to be logged into Canvas to use it. You can tell this from the lack of the /api/v1 in there at the beginning of the pathname.
It is possible to use those calls, I did it with obtaining an class access report and importing a rubric from a spreadsheet. To tell the particulars, be sure to scroll down to the request headers and you can see the form information that is posted, not just the address that is called.
This won't help in the case of the Treat Ungraded as 0, though. There is no network call made. It merely saves the value to a browser cookie, which means that if you clear the cookies or go to another machine or browser and don't have the cookies synced, then it won't remember the change.
In other words, trying to turn off the treat ungraded as 0 isn't going to work unless you can change the cookies on every machine the person uses.
That option isn't supported with the new gradebook yet, though, so that might provide some solace to you. Also it was only advisory in nature, and educating graders to how it really works is going to be more helpful. Many faculty thought it meant the students would see it, but it doesn't. Once the realize the purpose and how it works, it's a much less attractive option to click.
Retrieving data ...