Showing results for 
Show  only  | Search instead for 
Did you mean: 
Community Participant

[old gradebook] Treat ungraded as zero by default?

We would like to treat ungraded as zero by default (reference of the feature). However, there appears to be no such option in Canvas (currently we are using old gradebook).

Moreover, it is not clear where this settings is set at all: we did a number of tests and it looks like it is not saved on the course level, nor on the user level. Could it be that this setting is stored on the cookie level?

Tags (1)
0 Kudos
4 Replies
Community Coach
Community Coach

 @b_kheyfets , greetings! Given that this is more of a technical question - because you are correct, it's not built into Canvas - I'm going to share this with the Canvas Developers‌ group in the Community to see if they can help!

As a side note, I'm sure you have a very well thought out rationale for doing this, but as a Canvas user for over 6 years I wanted to include a word of caution. This feature is normally not well understood by faculty or students, and often causes a lot of confusion. In addition, this functionality isn't available in the new Gradebook, so you might spend some time getting this to work and then it not work as of January 2020 (when the new Gradebook is fully implemented across Canvas). Just a couple of caveats I wanted to include for you or anyone else who might read this later!

Have a good day! 🙂


Community Champion

 @b_kheyfets ,

To add to what Kona wrote, that option is purely cosmetic. It doesn't change what is in the gradebook, it only shows the instructor what the final grade would be for the student assuming that they didn't turn anything else in *and* the instructor went through and entered 0's for everything that wasn't turned in.

That's part of why Canvas is getting rid of it, but I'm not happy with their recommended solution. Since they don't have "What If?" grades for the instructor, it is nice for the instructor to be able to quickly determine what a student would get in advance of actually putting in zeros for them (say we want to counsel them on whether or not to drop the class).

To answer your question, it appears that it's stored in the local storage of your browser.

In Chrome, you can find it by opening the developer tools (F12), going to (1) Application, (2) clicking Local Storage and the name of your instance, and (3) looking for one that has include_ungraded_assignments.


The key is


The value is true when treat as 0 is checked and false when it is not checked.

I did change the value within the developer tools and reloaded the gradebook and it had changed the value, so I'm pretty sure that's the location.

If you want it to be the default for people, it would take some custom JavaScript to interact with the gradebook and enable it. I would not go that route. Instead, educate the people as to what it means and that the real way to get 0's is to put 0's in for the grades.

Community Participant

Thanks, James.

I'm thinking about adding this config via javascript, as a Canvas Theme javascript file. 

So I need to generate the appropriate key:

var pathname = window.location.pathname;

// if it is a gradebook - set "Treat ungraded as zero":
if (pathname.match(/gradebook$/i) !== null) {
var courseId = pathname.replace(/\/courses\/(\d+).*/gi, "$1");

var userId = ''; // ???

var key = '_' + userId + '_course_' + courseId + '_include_ungraded_assignments';
localStorage.setItem(key, true);

Do you happen to know any way to get the userId?

Community Champion

Yes. It's in the variable.

This is a really bad idea, though, and for multiple reasons including several not previously mentioned.

This code is not going to make it a default. It's going to force it on -- even if faculty decide to turn it off so that they can see the same grades the students have -- with every reload of the gradebook. They will no longer be able to uncheck it and have it persist.

The real solution is to force faculty to put 0's in. After 4 January 2020, this won't work and faculty will still have the same problems because it wasn't fixed the right way. It's an education issue, it's not a "we're going to show you that all of the students are failing so you think they're failing but they think they're passing" issue. This "treat as 0" is only for the faculty, it doesn't affect the students.

If you really want this, then your question should be "How do I put 0's in for every assignment at the start of the term?"