Autofill Maximum Rubric Ratings

James
Community Champion
34
6864

Introduction

This script adds a "Max" button to the Pts column header in a rubric in SpeedGrader.

2022-04-03_10-52-33.png

When you click the Max button, the script will go through your rubric and assign the maximum value to all criteria that do not already have points assigned. It keeps what you have already completed and then assigns the maximum value to the rest.

You may need to widen the SpeedGrader pane that has the rubric in order to see the button. I thought about putting it elsewhere, but it really belongs where it is since it directly affects the points.

Quick Install

  1. Install and enable the Tampermonkey browser extension
  2. Install the max-ratings.users.js user script

If your Canvas instance does not end in instructure.com, then you will need to edit the script after installation and modify the include line in the metadata at the top of the file to match your source code.

Why Is This Beneficial?

Some people have rubrics with lots of criteria in them so they can provide detailed feedback to the students. One person mentioned a rubric with 20 criteria and 25 students so it took 500 clicks to fill out the rubrics for that assignment. Most students ended up getting the maximum point values for most of the criteria, so a more efficient approach would be to start off with everything set to the maximum and then change the ratings for the criteria that did not receive the maximum.

This is a similar approach to how math (and probably other) teachers have graded for years. We start at 100% and then mark what is wrong.

You do have to click the button to make the script work. Some students do not submit assignments and it would be a lot of work to go through and delete the point values for those students.

This Canvancement is related to these discussions and feature ideas.

Technical

Like many of my Canvancements, this is a userscript. That means that it is something that the individual user gets to install in their browser to change the default behavior. They do not have to rely on Canvas or their institution to do something. It also means that you will need a userScript manager. Tampermonkey is the one I develop with and it supports most major browsers (Chrome, Firefox, Safari, and Edge).

Some institutions have restricted the ability for individuals to install extensions on their work computers. The IT department may be willing to make an exception, but do not count on it.

I have not tested this in a global custom JavaScript, which would allow all faculty to have access to this without the need to install Tampermonkey and the script. I programmed the script so that it should work in this manner, I just haven't tested it.

34 Comments
Ron_Bowman
Community Champion

@James -

Thanks for a great addition to the canvancements.  it  will save me grading time on my programming assignments.  I run those programs through a grading script and I get a list of all students that Have a perfect output match.  I then just have to look at the code to make sure that they followed the criteria outlined for the project.  This will make the assignment of the rubric scores for those students much quicker.

 

Ron_Bowman
Community Champion

@James -

I have been using this canvancement a lot and really like it.  I don't know if it is easy to do or not, but can you make the button toggle between max score and then remove all of the max scores?

What I have done some times when I am grading assignments that are not all submitted - or I am looking at assignments out of order, I have the wrong student up in the rubric and I hit max.  I then have to go back and click on all the rubric options to take those scores off.  I just thought it would be nice if I could just hit the max button again and have the script automatically turn all the max selections off.

No worries if it is not possible (or easy to do).  I'll just have to learn to be more careful.

Thanks again as always for the work you do for the rest of us.

James
Community Champion
Author

Ron ( @Ron_Bowman ),

If I understand correctly, you're asking for an "undo" capability, but only for the items that it set equal to the maximum. If someone manually clicks a maximum rating, then clicks the max button, it should leave the manually set rating -- or do you want that removed as well?

When I wrote it, I thought about what functionality I should include. Undo didn't cross my mind. I did think about making a second click override the existing scores and force a maximum. I suppose there could be a three-click state: 1 existing behavior, 2 force maximum, and 3 reset to original. A fourth click would start the process over.

With both of those, I would need to store the initial state and keep track of how many times the person has clicked. That much shouldn't be difficult. I would need to detect when the student changes to reset things. I think I can borrow from QuizWiz for that.

I'm not sure when I'll get around to looking at it. I'm also not sold on the need, which may delay things a bit. It's a little more clickish, but you can cancel the rubric without saving it and then reopen it to get back to the original rubric. Is there a better use of the clicks when a solution works for the oops?

If people have a different idea about what a third click should do, I'd be interested. I've recently wished there was a "min" button as well for those students who don't submit the assignment but I want to complete the rubric anyway.

If I do go with the three click thing, I can see "max" for the default label, "MAX" for an override to force the maximum. I'm not sure what I would use for restore. Maybe the undo icon? The word undo is four letters and a different width. Maybe I could use "xaw" which is "max" rotated 180° or perhaps "wax" which is a vertical reflection. Using terms that no one understands is bad UI design, though.

Unfortunately, there won't be a way to restore the original rubric if you save it and move on.to another student. I don't think the grade audit stores the rubric changes, but I haven't looked beyond the gradebook history to make sure.

Now that I start to think about things, there may be more to an undo than I initially thought. The script itself ended up being much more complicated than I expected because of the different modes that the rubric can appear. Unsetting a value is going to have to be handled differently as well.

A potential issue is if the script sets a maximum, then people change it, and then click max a second or third time. A second click would force the value back to a maximum, which is not what you wanted. What does the third click do in the case that something changed between clicks on the button? If you reset it completely, you lose all of the changes. If you reset it to where it was before the first click of the max button, then you lose the changes made since then. You may want one of those approaches, but others may want the other approach.

I suspect this lack of a clear path forward is why some things don't get developed at Canvas. Sometimes they forge forward and come up with some really confusing constructs (the visibility icons were this way for a while) but the more frequent outcome is something that has been planned and vetted by lots of people. I've heard some Instructure employees say they sometimes hold off on quick solutions so that a good one can be found and I have to admit that when they do things that I've written a Canvancement for, their solution is normally far superior. They do roll things out incrementally, but they typically have a path planned out so that they don't have to rollback things that have already been pushed out.

Ron_Bowman
Community Champion

@James Thanks for the great response.  No need to worrying about implementing the feature - just something to do if you feel up to it and have a spare minute or two 😊

My thought was along the lines of undo the score on all rubric entries after it had been saved.  For me I want it to reset the rubric scores for a student - usually I have been looking at the wrong student assignment for the student I have up in speed grader and save it before I realize my mistake.

I do not want to over complicate the display with extra buttons, but I had thought about asking for a 0 button as well for as you said - students who don't submit.  The three features I would want are Max, Min and Reset(reset the entire rubric - regardless of where the scores came from).

Along the above lines, I came across an issue that you may or may not want to consider fixing.  My naïve thought is that it will be a simple one or two lines of code fix.  If I hit the save and advance function on a rubric with no grades entered, I get a red square around the score box with invalid score showing (because of the two dashes that Canvas has in there to begin with).  If I have done that, then the max feature does not put the scores in - my guess is there is something being indicated as a score and that your script therefore assumes there is a grade there and does not max out that value.

James
Community Champion
Author

The checking for the --, NaN, invalid response type stuff should be a quicker fix than the other. Those responses come from Canvas and I don't like them, but I that's a separate issue than the max button. The max button could check for the presence of that and that should be a relatively quick fix once I get the time to look at it.

Part of the reason I needed the 0 was because I have a rubric that I fill in incrementally as they turn in homework, so most of the values have -- in them, but as soon as I put in the first rating, they essentially have a low score for the assignment. It gets dropped as the lowest grade in that category so it doesn't mess with their grades until closer to the end of the chapter. But I still have to deal with the invalid response making the rows take up more space than they need to so I have to do more scrolling closer to the end of the chapter.

I could save the values of the rubric before maximizing them and keep that in the browser's memory so that it could be restored as long as you were still on the same page in SpeedGrader. There's little I could do that would save it across SpeedGrader sessions. There is storage in the browser that I could use, but that seems like overkill. My preferred solution is to slow down and double check before you click the button.

I'd rather have a button for "copy" than any of the other things you mentioned. I have students who work together and turn in the same assignment, but a groups assignment is too much overhead for what I need. However, I have to transfer the ratings and comments from one student to the other. If I could just "copy" a rubric and then paste it over another, it would make life go faster. This is what some people have been asking for with a "default" rubric. You could fill it out however you want it and then paste that to give a starting point. As with your situation, with great ease of use comes a need to be careful not to use it too quickly.

James
Community Champion
Author

@Ron_Bowman 

I modified the script so that it now handles the -- invalid score case. Only needed to change 1 line to make it happen, but then had to bump the version number and I had a linter warning about using _mutations instead of mutations to make it obvious that I wasn't actually using it. So 3 lines changed in total.

Ron_Bowman
Community Champion

@James - thanks for that simple fix.  I actually logged into my home computer and tampermonkey had updated.  So I looked at the installed scripts to make sure max was installed and noticed it had been updated.  So I figured you had modified it in some manner.

Thanks again.  Have a great weekend.

fairwea
Community Member

James you have just saved me from death by clicking. Thank you so very much!

Ron_Bowman
Community Champion

@James -

I was showing the max feature to some of our Canvas support staff when I came across a minor issue(I doubt this will come up during regular use).

I took a rubric that had all scores reported, so I deleted a couple of scores leaving them marked as invalid scores - there were still some valid scores present.  I clicked the max button and nothing happened.  If I removed the dashes on one of the invalid score boxes, max would fill it in, but still leave the others as invalid.

My guess is that your script has two areas - one for no scores reported and one with some scores reported.  the one line fix you did earlier is in the no score reported section and that it needs to be added to the other area.

 

James
Community Champion
Author

@Ron_Bowman 

I'm unable to duplicate what you're saying. Perhaps I'm missing something? I went to a rubric that was fully completed and saved. This is in a rubric used for grading and that had criteria. I deleted the score for some entries and clicked on the selected scores for others to remove the scoring. Deleting the score gives "Invalid score", clicking on the selected rating does not. When I clicked the max button, the maximum point value was assigned to all criteria that were non-scored.

I even tried updating the rubric with the missing values and then coming back to it. All of the missing values now said "invalid score" but the script still did what I expected.

I don't have different areas of the code for partially vs fully completed rubrics. I have two areas, one for when there are points and one for rubrics without points (what I call pointless rubrics).

The behavior sounds like what I would expect if you were running version 2 of the script instead of version 3.

Ron_Bowman
Community Champion

@James -

Thanks.  I guess the auto updates for scripts on tampermonkey are not set properly.  I was in fact using version 2 and not version 3.

 

James
Community Champion
Author

2022-05-07 update to version 4: I added a check to make sure there was actually a rubric on the page before trying to use it.

DanBerkenkemper
Community Explorer

Hello @James !

I am really excited about this extension, but I cannot get it to work for the life of me. I work at Liberty University and I have a coworker who told me about it and he can get it to work. I tried including a screenshot on this comment, but can't figure that out either. Everything says "enabled" and I've turned it on and even the @include line looks fine.  Any ideas what I might be doing wrong? Definitely willing to donate to this noble cause. 🙂

Thanks! -Dan

 
 

 

James
Community Champion
Author

@DanBerkenkemper 

Is there a red badge on the Tampermonkey icon that shows [at least] 1 when in SpeedGrader? If not, then it's not recognizing the include line in the metadata at the top of the script.

If Liberty is using a custom URL, that include line will need changed. It looks like (thank you Google), that you are using canvas.liberty.edu instead of something like liberty.instructure.com.

That means that your include line should look like this (no *. in there):

https://canvas.liberty.edu/courses/*/gradebook/speed_grader?*

 

DanBerkenkemper
Community Explorer

@James 

Thank you so much for the quick response and being willing to help! There is a red badge that shows "1" when in speedgrader. It is recognizing the include line in the original script. I tried the custom URL you provided just for fun and it is not recognizing that one. I have tried this in Chrome and Firefox, but I still can't get the "max" button to appear. Any other ideas? 

I'll check with my coworker this week. It seems to be working fine for him. 

-Dan

James
Community Champion
Author

@DanBerkenkemper 

Let me know what you find out when you check with your coworker. It's still working for me, too.

I used to recommend people go into the developer tools in the browser and look for error messages or warnings, but Canvas has implemented a system that traps those messages so the user never sees them. That makes debugging harder to do, especially when you don't have access to the computer experiencing the problem.

It may be the type of rubric that you're using. If there are no rubric ratings to click, then it won't run. Your coworker might use a different type of rubric.

If you feel comfortable editing the code, we can check and see what is happening. Look in the addButton() function around line 38. (the line numbers may be off slightly). There are three querySelector statements where it tries to find a CSS selector and then an if statement at line 48. Before the if in line 48, you could add this block, then save it.

 

console.log('MAX RUBRIC');
console.log(th);
console.log(input);
console.log(rating);

 

From SpeedGrader, open the developer tools in Chrome [or Firefox] by pressing F12 and switch to the console tab. Then reload the SpeedGrader page, click View Rubric, and look for the messages in the console right after it says MAX RUBRIC. (edit: I originally left out the super-important step of clicking on View Rubric).

If it cannot find th or both input and rating are null, then it returns and never adds the button.

If it never says MAX RUBRIC, then we know that the problem lies before that point and it may be something with the MutationObserver.

DanBerkenkemper
Community Explorer

@James 

Thank you so much! I started looking at the coding, and did what you suggested, but I'm a little lost. I'm truly not sure what I'm doing. I know this is a big ask, but I would love to live chat with you about it at some point. Absolutely no problem if that doesn't work. My direct email is dmberkenkemper@liberty.edu 

My coworker returns tomorrow, so I'll ask him as well. 

Again, thank you! You have been so helpful. 

Have a great week. 

-Dan

Ron_Bowman
Community Champion

@DanBerkenkemper -

can you provide the url of your course when you are on the home page just show the  part up through courses - don't provide the number afterward. (i.e. mine is https://schoolname.instructure.com/courses) and what I have in the script is: 
// @include https://*.instructure.com/courses/*/gradebook/speed_grader?*

I use this script and do not have the issue you do.

The other thing to try (if you haven't already) is delete your current version and reinstall it.  Just to make sure that something did not go wrong or something was inadvertently changed somehow.

Also when you are looking at the rubric in speed grader, as James stated you should see a number next to tamper monkey icon.  when you click on it, one of the items you should see is like the following

 

max_rubrics.jpg

 The slide should be green. 

You may have already done all of the above, but I wanted to double check.  I use a lot of the scripts  that James has written and the only issues I have had are from my own playing around with them.

Ron

James
Community Champion
Author

Dan ( @DanBerkenkemper )

I'm sending you an email and should have that finished within the next hour. I try to avoid the phone as it's difficult to see what's going on with them.

I don't think this is your problem, but I mention it just in case someone else stumbles across this thread and cannot find the Max button. You will likely need to widen your SpeedGrader frame. The Max button is over the Pts column and if the Pts column isn't showing, then you won't see it. Dragging the SpeedGrader frame wider lets it show up. That's automatic for me since the default width is too narrow for me to see the full rubric, but it may not be for someone else.

DanBerkenkemper
Community Explorer

@Ron_Bowman 

Thank you for trying to help Ron! It's helpful to double check. I have tried all of those things, and still no luck. I am using that script, and all indications say it should be working. It works for my coworker, and when in speed grader I get the little red "1" next to it. The slide is green, and I have deleted and reinstalled it. I have also zoomed way out or slid the rubric way over to make sure it's not somehow hidden. I have also tried it on 3 different browsers, cleared my cookies, made sure pop ups are disabled, and tried it on multiple different rubrics in several classes I teach. Still nothing. I even sat for a while with my coworker who has got it to work and we are doing the exact same things with the same university issued computer. We couldn't figure it out. Here's my speed grader link if that helps: 

https://libertyuniversity.instructure.com/courses/sis_course_id:20224019420/gradebook/speed_grader?a...

Thanks again for trying to help! 

-Dan

DanBerkenkemper
Community Explorer

@James 

Thank you James! I was hoping it was a simple fix like that. I can see the points column though. I have tried sliding it way over, and zooming way out as well. Still nothing. See my reply to Ron above. This is a real headscratcher. For my coworker, it just worked right away, no problem. 

Again, thank you so much for trying to help!

-Dan

Ron_Bowman
Community Champion

@DanBerkenkemper -

When you say it works for a colleague, but not you - is that on the same computer logged in as the same person(on the computer) using the same browser on the machine?  The only difference being that you are logged into your canavas account and they are logged into their canvas account?

Another idea - go into tampermonkey on your colleagues computer and find the script and display it.  copy the code and save it to a text file.  then log into your account pull up tampermonkey and replace the code for your version of the script with the one that works.  Or you could just use your colleagues computer and log into canvas on their browser that has the script working for them.

good Luck!

Ron

James
Community Champion
Author

@DanBerkenkemper 

I responded by email, but your URL is not one that is generated by Canvas. Canvas doesn't put sis_course_code:xxxx in the URL, it has courses followed by a number. I'm guessing that you are following a link generated by something other than Canvas to get to SpeedGrader.

There were some other potential issues with the screenshots you sent me. The download button isn't standard and so someone is injecting some extra code. That might be a Canvas extension or some custom JavaScript that Liberty is using. That has the potential to mess up the other checks, but my code is definitely not running to even get to that point.

My code exits because of a check in my code that makes sure that it's running on the right page. I added that check on lines 14-18 of the code. It's there in case someone want's to add this script to their global custom JavaScript for all users of Canvas.

If you're running it locally through Tampermonkey, the check could be removed or commented out. You could also modify the regular expression to allow for sis_course_code in there.

Either of these changes to the code should get us past the initial hurdle and may be sufficient to make it work.

This comments out the check, but leaves the code in case that's not the issue. If it fixes it, then you could delete the lines that I commented // out.

//  const speedGraderRegex = /^\/courses\/\d+\/gradebook\/speed_grader$/;
//  if (speedGraderRegex.test(window.location.pathname)) {
    rubricObserver();
//  }

 

You can also modify the regular expression to allow things other than just numbers. I've replaced the \d+ with [^\/]+ which means match any character except for a /.

  const speedGraderRegex = /^\/courses\/[^\/]+\/gradebook\/speed_grader$/;
  if (speedGraderRegex.test(window.location.pathname)) {
    rubricObserver();
  }

 

DanBerkenkemper
Community Explorer

@James 

The code on line 14 worked!! I am so excited. Thank you so much. 🙂

This is a game changer for sure. I am truly grateful. 

-Dan

Ron_Bowman
Community Champion

@DanBerkenkemper and @James -

first, good explanation James on resolving the issue.

Dan, you say your coworker did not have the issue, but you did.  I assume this coworker is at Liberty as well.  I am curious as to how the script worked in their class and not yours if the urls for the courses are all like yours.  You might want to find out if the URL's are similar in construct between the two courses.  Or if yours is one way and your coworkers is the way Instructure normally does courses.  If the URLs are different formats, I (meaning if this were happening to me) would be curious as to why there is the different format.

Just out of curiosity is one of the courses an online course and one of them an on campus course?   

James
Community Champion
Author

Ron ( @Ron_Bowman ), given the URL, I suspect there was an external system that provided a direct link to SpeedGrader. I haven't confirmed that with Dan, but there are some other modifications beyond the standard Canvas interface in what he sent me.

If the other instructor was accessing SpeedGrader from within Canvas, then it would use a Canvas-generated link that would use the Canvas course ID rather than the SIS course ID. I suspect that if Dan had clicked through to SpeedGrader from within Canvas that it would have worked from the start.

BriannaJames1
Community Explorer

Hi @James!

This is an amazing feature and so easy to install! Thank you for creating it you have saved me a lot of time can't wait to share it with our institution. 

chogiwa
Community Member

Hi @James 

Thank you so much for this! It is working well for me. Is there a way to autofill non-scoring rubrics to the max too? Currently it fills the normal ones just fine, but the non-scoring rubrics are left empty. I'm not terribly familiar with coding so I don't know where to troubleshoot!

Ron_Bowman
Community Champion

@chogiwa -

What do you mean by a non-scoring rubric?  I can figure it out probably, but I figured I would ask.

I just created a rubric with two criteria and 4 possible results for each - I assigned 0 points to each result.  When that is done, the script selects the first result which would normally be the high point value.  So, I am not sure why you are not seeing that result.

Ron

chogiwa
Community Member

Hi @Ron_Bowman 

Thanks for the reply, I had to do some digging and I think I used the wrong term previously. Turns out I was referring to Outcomes. (Edit Rubric -> Find Outcome) So I'm trying to see if there's a way to automatically max the Outcomes when I'm grading? 

Screenshot 2024-05-28 at 4.11.15 PM.png

Ron_Bowman
Community Champion

@chogiwa -

I have never used outcomes.  However, I just succssfully created one and added it to an assignment - I did not have it reporting to mastery and I selected to use it for grading the assignment.  The MAX rubric rating script worked for me (as did the min and reset versions I hacked from James' original max rating)

I probably do not completely understand what you are trying to do with outcomes and how it integrates in with the assignments/rubrics

Ron

James
Community Champion
Author

@chogiwa 

There is probably some selector in the outcomes that don't count that doesn't match what I'm looking for. I know that I did not even think about outcomes at all (I tried them in 2016 but haven't used them since) when I created the script.

What Ron ( @Ron_Bowman ) saw was that outcomes that count work, but non-scored ones don't, so that gives an idea of where to look.

Unless I just need a break from things, I don't expect that it will be resolved any time soon. I have 30 years-worth of projects that need completed before the start of fall classes.

woodsdm2
Community Contributor

@James  This is such a time saver - thanks for creating it.

It's probably no surprise that this doesn't work with the new "Enhanced Rubrics" feature option from Canvas.  I am hoping you have time to update this to work with the enhanced rubrics.

Fortunately, I am still able to turn this feature option off!

James
Community Champion
Author

@woodsdm2 

It is not on my radar right now. I started converting the rubric importer over and made a lot of progress, but then got busy with my real job.

When I looked at Enhanced Rubrics for the importer, I saw that it was a terrible thing to implement, which made me not feel so bad about not supporting it. On the flip side, they're still making changes to things, which makes it hard to hit a moving target.

A bunch of stuff has happened this year that makes it really hard for me to find time to do anything enjoyable -- like program things to help people. Hopefully that issue will be done by March 2026.

For the time being, you can have enhanced rubrics or the max points, but I cannot give you both.