QuizWiz: Enhancements to SpeedGrader and Quizzes

James
Community Champion
137
51678

QuizWiz is a user script developed by  @James   and  @avi_naiman  that adds speed enhancements to quizzes, assignments, and discussions within SpeedGrader. It also provides alternative scoring methods for certain types of quiz questions. It runs in SpeedGrader and on the Quiz Moderation pages.

Installation instructions are near the bottom, but please read and understand this document before you install QuizWiz, especially if you choose regrading options.

Feature Overview

Currently, all of the following features are configurable except for duplicating the information from the bottom at the top.

Speed Improvements

Some of the speed improvements are specific to quizzes and will work from either SpeedGrader or the Quiz Moderation page. Other enhancements are specific to SpeedGrader, but will work for quizzes, assignments, and discussions.

  • Can assign zero points to any unanswered Essay or File Upload quiz questions.
  • Can assign full points to any answered, but ungraded, Essay or File Upload quiz questions.
  • Duplicates the Final Score, Fudge Points input, and Update Scores button at the top of a quiz page when the user is not using SpeedGrader's Grade by Question mode.
  • Duplicates the question header of question number and point values at the bottom of each quiz question.
  • Automatically expands a quiz question's Additional Comments textbox when you start typing in it.
  • Adds a button next to the Update Scores button quizzes that will update scores and automatically advance to the next user.
  • Adds a button next to a submission comment's Submit button that will submit the submission comment and automatically advance to the next user.
  • Adds a button next to a rubric's Save button that will save the rubric and automatically advance to the next user.
  • Automatically expands a rubric when you advance to the next user. This feature depends on the Save Rubric and Advance feature.

Regrading Features

The following features are specific to quizzes.

Each of these methods adds a button at the top of the quiz to invoke the method. Each button contains the number of questions on the student's quiz that would be affected by clicking the button and buttons will not show if they would not make any changes to the quiz. Buttons are disabled after being run, but left visible on the screen so that you can see how many questions were affected. Any of these methods can be configured to automatically execute once the quiz has loaded.

  • Can regrade Multiple-Answers questions, which are also known as multiple-select questions, using different approaches than Canvas. Only one of the following can be enabled at a time.
    • All or Nothing provides the ability to grade questions without any partial credit – all of the parts must be correct to receive any points.
    • Partial Credit based off the percentage of items that are correctly answered. An item is correctly answered when the student selects a correct response or does not select an incorrect response.
    • The Difference between the number of items correctly answered and the number of items incorrectly answered. This is sometimes called right minus wrong method. It invokes a penalty for guessing, like the Canvas-native approach method does, but bases it on whether a response is correctly answered and considers all items, not just those that are selected.
  • Can regrade Fill-in-Multiple-Blanks questions using the All or Nothing technique of no partial credit. Canvas currently grades these questions based on the percentage of items that are correctly answered.
  • Can regrade Multiple-Dropdowns questions using the All or Nothing technique of no partial credit. Canvas currently grades these questions based on the percentage of items that are correctly answered.
  • Can assign zero points to any unanswered Essay or File Upload quiz questions. Although this was listed as a speed enhancement, it still changes the default grading of Canvas and so it is listed here as well.
  • Can assign full points to any answered, but ungraded, Essay or File Upload quiz questions. This is another speed enhancement that provides an alternative to the Canvas default and is invoked via a button.

Videos

QuizWiz Introduction

This video demonstrates how Avi Naiman used QuizWiz to reduce grading time on mathematics homework by 75%. Grading a typical student's quiz submission went from 22 clicks in SpeedGrader to 5 clicks in QuizWiz. Like many math teachers, he takes points off rather than adding points up. By assigning full points to all essay questions, he can skip the majority of the questions and then only click on the ones that missed points.

The video also illustrates many of the problems with SpeedGrader: the Additional Comments box is small and often needs to be expanded; the points for a question are only at the top so you have to scroll back and forth with long essay questions to grade; assigning a 0 requires two clicks, one up and one down; essay and file upload questions must be manually graded, even if they are unanswered.

He had QuizWiz automatically assign 0's to unanswered questions and full points to the answered essay questions. He also enabled the automatic expansion of comment boxes, and duplicated the question headers at the bottom of the question to minimize scrolling. The advance to next student upon updating scores was not available at the time he used it in his classes.

Canvancement Installation

This video shows how to install a Canvancement, including how to install a script manager like Greasemonkey or Tampermonkey if you have not already done so. Once your script manager is installed, it shows how to install and edit a script as well.

Note that QuizWiz requires you to select a flavor based on your desired usage whereas many of the Canvancements only have a single script.

This video is for Safari on a Mac, but the process is similar for Windows.

QuizWiz Regrading Methods

This video explains how Multiple-Answers questions are graded in Canvas and then how they would be graded using the All or Nothing approach and the Partial Credit based on the percentage of correct responses method.

The video also mentions the all or nothing approach for Fill-in-Multiple-Blanks and Multiple-Dropdowns questions.

Regrading Methods

There are several methods of regrading that are available with QuizWiz. It is important that you understand how the process works before you use them.

Canvas does not know about QuizWiz – QuizWiz knows about Canvas.

Canvas is going to do what Canvas does. Quizzes will be scored the way they normally are. When Quizzes 2.0 become available you may have more options available to you. QuizWiz is something that you can use while you wait on changes to happen to Canvas.

If you choose one of the regrade methods that changes how grades are calculated, then you need to let your students know that their grades are subject to change or they will think that the grade Canvas gives them will be the grade they get.


If you regrade a question using Canvas, it may override changes that you made using QuizWiz and you may need to reapply QuizWiz.

No grading changes in QuizWiz are saved until you click Update Scores.

But there is also no easy way to undo what it does once it has done it. There is no "Regrade the Canvas Way" button. You might want to play around in your test or beta instance before using it in production.

You must make the updates to each student, there is no bulk "apply to entire class" option.

When Avi Naiman first approached me, my first idea was to write a script that would just automatically do what he wanted for every student in the class. As we fleshed things out, we decided it would be better to incorporate it directly within SpeedGrader so that the grader could see what was happening.

However, if you want to grade the entire class using the All or Nothing approach for multiple-answers questions, then you can make that method automatic in the configuration file and then use the update scores and advance to next student button and then it's only one click per student. Maybe not ideal, especially if you have 1000 students in a class, but much faster than the current method of manually regrading each question.

Buttons only appear when they would make changes.

This allows you to see what is going to happen before it happens. The buttons are also labeled with badges that show how many quiz questions will be affected.

Using the buttons will change every quiz question affected by that method. If you only want to grade, for example, question 5 using a different method, you'll still need to do that manually, but you can take advantage of other features like update scores and advance to next student.

Regrade methods may be disabled, enabled, or autorun.

You choose how you want it to work. Conflicting methods, like grading Multiple-Answers questions All or Nothing and also Partial Credit cannot be used at the same time.

Feature Descriptions, Rationales, and Use Cases

Show counts on buttons

This will show you how many quiz questions will be affected by clicking the button. Once you click the button, the button becomes disabled, but the count remains so you can tell how many quiz questions were affected.

Button Count

You'll never see a badge with a 0 on it – the button just won't show up at all.

Assign 0 points to unanswered essay and file upload questions

Essay and File Upload questions must be manually graded. That sounds like a reasonable expectation, but when a student doesn't even bother to answer the essay question or upload the file, then the grader still needs to enter a 0 for those questions. If the grader is using the mouse, then it requires two clicks of the mouse to change the score to 0.

This regrading method automatically assigns a 0 to essay and file upload questions that do not have an answer and have not yet been graded. If, for some reason, the instructor decides that a non-answer should be worth 5 points, QuizWiz will honor that decision.

Since most people who have essay questions don't award points for blank answers, automatically assigning 0's for them speeds up the process.

This button will be labeled "Unanswered" when it is available.

Assign full points to answered essay and file upload questions

Essay and File Upload questions must be manually graded. Some professors like to assume that the questions are correct and then deduct points as needed. This regrading method automatically assigns full points to essay and file upload questions that have been answered but not yet graded. Once there is a score for an essay or file upload question, then QuizWiz will honor that grade.

This method allows graders to deduct points quickly for incorrect answers and skip questions that would get the full points. Many professors grade this way - by subtracting points when the answers are incorrect, rather than adding points when the answers are correct.

This button will be labeled "Full Points" when it is available.

Multiple-Answers All or Nothing

Multiple-Answers or multiple-select questions are normally graded in Canvas by dividing the points for the question by the number of correct items and then awarding points when a correct item is selected and deducting points when an incorrect item is selected. See Understanding Multiple Answers Questions for more information.

Sometimes it is desirable to grade these questions using an all or nothing without partial credit. This feature will go through and automatically assign 0 points to any question that did not select all of the correct items or did select any of the incorrect items.

Certain national licensing exams are based this way and instructors currently have to go through and manually regrade the quizzes or find other ways to ask the questions.

This button will be labeled "MA All/None" when it is available.

Multiple-Answers Partial Credit based on the percentage of correctly answered responses

This grades Multiple-Answers questions based on the number of items that are correctly answered. This essentially turns a Multiple-Answers question into a set of true-false or yes-no questions. The student is awarded points for selecting a correct item and for not selecting an incorrect item. Each item's point value is found by dividing the total points for the question by the number of possible responses.

This is a very popular method of grading. If the student correctly chooses 80% of the responses, then they get 80% of the points. One often-overlooked issue of this method is that students are awarded points even if they skip answering the question.

This button will be labeled "MA Correct" when it is available.

Multiple-Answers Difference between correctly answered and incorrectly answered responses

This approach, sometimes called "right minus wrong", scores Multiple-Answers questions by taking the number of correctly answered items and subtracting the number of incorrectly answered items. Each item's point value is found by dividing the total points for the question by the number of possible responses.

I can't provide a direct use-case for this one, but it invokes a penalty for answering incorrectly, so it is less likely that a student would get points for leaving a question blank. It was available in other learning management systems, which means that some people probably use it, and it was easy to add.

This button will be labeled "MA Difference" when it is available.

Fill-in-Multiple-Blanks

This method grades Fill-in-Multiple-Blanks questions as an all or nothing approach without partial credit. Canvas currently awards partial credit based on the percent of items that people have correctly answered.

I have never seen a request for this in the Community, so there may not be much demand for this. But it seemed logical that if someone wanted to grade Multiple-Answers as all or nothing, that they might want to do the same thing for fill in the blanks questions.

This button will be labeled "Fill in Blanks" when it is available.

Multiple-Dropdowns

This method grades Multiple-Dropdown questions using an all or nothing approach without partial credit. Canvas currently awards partial credit based on the percent of items that people have correctly answered.

I have never seen a request for this in the Community, so there may not be much demand for this. But it seemed logical that if someone wanted to grade Multiple-Answers as all or nothing, that they might want to do the same thing for fill in the blanks questions.

This button will be labeled "Dropdowns" when it is available.

Duplicating the footer at the top

When grading quizzes, there is currently a footer at the bottom that allows you to adjust the fudge points, shows the final scores, and then allows you to update the scores.

Quiz Footer

People complained about having to scroll all the way to the bottom of the question to make these adjustments. This feature duplicates the information at the top of the quiz so that you don't have to scroll to see the information or make the changes.

Quiz Custom Top Footer

This feature is currently the only one that is not configurable. If you use QuizWiz, you get this. Note that if you are using the Grade by Question feature, that the footer remains on the screen at all times and so it is not needlessly duplicated at the top.

Duplicating the Question Header at the bottom

The top of each question has the question number and the points awarded for that question. This feature duplicates that header at the bottom of the question.

Duplicating Question Header

Without this feature, in long essay questions, instructors have to scroll back to the top to award points and then scroll back past the answer to move to the next question. This feature minimizes scrolling.

If you're interested in showing the question name after the question number, then install the Show Question Names script as well (click on the Raw button once you go to that page).

Automatically expand the additional comments box

The Additional Comments box is quite tiny and people often have to expand it. This feature will automatically expand the box when you start typing in it and shrink it back down if you delete the comment. It will also automatically expand if you paste the clipboard contents into the box.

Auto Expand Additional Comments (gif)

Update Scores and Advance to Next User

Quizzes have an Update Scores button at the bottom. A common complaint when grading quizzes in SpeedGrader was that graders would have to scroll to the bottom to update the scores and then move the mouse back to the top to press the advance to next student triangle.

Canvas has addressed some of those issues with the August 2016 facelift, but all they really did was move the arrow from the left side to the right side at the top. The Update Scores button is still at the bottom and the next user is still at the top.

Many people probably felt they also had to wait for the quiz to fully load before clicking the Next student button. While technically not true, if you click it too quickly, then the scores aren't updated and if you return to that student, then it kept the original score in the grade box, causing concern about whether or not the change had been made. Those who noticed this probably consciously decided to slow down until the grade had changed, which took some of the speed out of SpeedGrader. For those who wondered, the grade was actually changed when this happened, it just wasn't reflected in SpeedGrader until you reloaded SpeedGrader.

This feature adds an update scores and advance to the next user button next to the Update Scores button. Of course, it does this at both the bottom and the top.

Update Scores

If you press the Update Scores button, then it will update the scores and remain on the current student as is the current behavior.

If you press the right arrow button, then it will first update the scores, wait long enough for the changes to be made to the grade in the right panel, and then advance to the next user. This means that if you return to this student, you will see the correct grade in the right panel.

This feature only applies to quizzes when viewed from within SpeedGrader. Discussions and Assignments don't have an Update Scores button and there is no concept of Next student from the Quiz Moderation page.

Submit Comment and Advance to Next User

There is an Assignment Comments box in the right panel of SpeedGrader. There is a  Submit button next to it that will submit your comments and leave you on the page to continue grading.

If submitting the comment is the last thing you need to do, then you have to go click on the Next student button in the top navigation bar. Luckily, submitting a comment doesn't affect the score, which requires a quiz or assignment to reload, so the delay is minimal, but it's still extra mouse movement.

This feature adds a submit comments and advance to the next user button. This button is available whenever SpeedGrader is: assignments, discussions, or quizzes.

Assignment Comments

Clicking the right arrow next to the Submit button will submit the comment, wait for it to show in the comment panel, and then advance. If you press the button when there is no comment, then it just moves to the next student.

Save Rubric and Advance to Next User

If your assignment, discussion, or quiz has a rubric assigned to it, then there will be a View Rubric button in the right panel of SpeedGrader. Clicking this button will open up the rubric where you can make your changes and click Save. If the rubric is used for grading, then saving the rubric forces the user to wait while the page is reloaded on the left.

This feature adds a Save a rubric and advance to the next user button.

Save Rubric and Advance

Clicking the Save button will save the rubric and leave you on the current user so that you can perform additional grading like leaving a comment.

Clicking the right arrow next to the Save button will save the rubric and wait for any changes to be reflected in the grade and then advance to the next user.

Automatically expand a rubric when advancing to the next student

Many people use rubrics in SpeedGrader to grade the assignment without leaving comments. The flow process is normally to 1) click on View Rubric, 2) complete the rubric, 3) click Save, 4) wait while the page reloads, 5) move to the top and click the next student button. This five-step process is repeated for each student.

This feature will automatically expand the rubric when using the save rubric and advance to next user button. When both of these options are enabled, the process the first time is 1) click on View Rubric, 2) complete the rubric, 3) click Save and Advance. For the students after that, it's just 1) complete the rubric, 2) click Save and Advance.

It was a conscious decision to have the rubric automatically open only when clicking on the save rubric and advance to next user button. It would be possible to have the rubric automatically open anytime the SpeedGrader was loaded or the user was advanced; however, as the rubric hides the grade, it would take extra steps to close the window to see what the grade was.

Installation

QuizWiz has been tested on Firefox, Chrome, and Safari.

Installation instructions can be found on the QuizWiz Canvancement site. The quick install is

  1. Install a browser add-on: Greasemonkey for Firefox or Tampermonkey for Chrome/Safari.
  2. Choose one of the QuizWiz Installation Scripts. Do not install more than one script.

Normally, the link in step 2 of the Quick Install directions will install the script for you. However, this time there are multiple varieties of QuizWiz from which to choose. Listed below are short descriptions; clicking on one of these links will install the script after you've completed step 1. Do not install more than one script.

Features common to all of these scripts include enabling the automatic expansion of the comment box, duplicating the question headers, and duplicating the footer at the top when not using Grade by Question. Do not install more than one script, regardless of the type. Instead, find the one closest to what you want and then edit the configuration (see the second video).

Scripts that focus on speed enhancements

All of these scripts enable the automatic expansion of the comment box, duplicate the question headers, and duplicate the footer at the top when not using Grade by Question. Do not install more than one script, regardless of the type. Instead, find the one closest to what you want and then edit the configuration (see the second video).

  • Speed enhancements only contains just the common features listed above.
  • Auto Advance includes the common features and adds the advance to next users buttons, but does not automatically show the rubrics on advance.
  • Math Whiz is the configuration used by Avi Naiman in the first video. It takes the common features and adds automatically assigning 0 points to unanswered questions and full points to answered essay and file-upload questions.
  • Rubrics is a configuration that may be useful for those who grade with rubrics. It includes the common features, the advance to next user buttons, and automatically opens the rubrics when you advance via the save rubric and advance to next user button. It also includes automatically assigning 0 points to unanswered essay questions.

Scripts that focus on regrading

All of these scripts enable the automatic expansion of the comment box, duplicate the question headers, and duplicate the footer at the top when not using Grade by Question. Do not install more than one script, regardless of the type. Instead, find the one closest to what you want and then edit the configuration (see the second video).

  • All or Nothing includes those common features and adds buttons for regrading multiple-answers, fill-in-multiple-blanks, and multiple-dropdown questions as all or nothing.
  • Partial Credit includes those common features and adds a button for assigning partial credit based on the percentage of responses correctly answered.

Custom domains and other configuration changes

The scripts run on any pages that look like SpeedGrader or Quiz Moderation pages on Canvas instances, including test and beta, that use .instructure.com as their domain name.

However, if you use a custom domain, like canvas.institution.edu, then you will need to edit the configuration file so that it recognizes your Canvas instance.

If you do not know how to edit a user script, please see the instructions on the Users Scripts page on the Canvancement site.

There are two lines near the top of the script that look like:

// @include     https://*.instructure.com/courses/*/gradebook/speed_grader?*
// @include https://*.instructure.com/courses/*/quizzes/*/history?*

You will need to change *.instructure.com to match your Canvas instance. For example, if your production site is canvas.institution.edu, then you would use:

// @include     https://canvas*.institution.edu/courses/*/gradebook/speed_grader?*
// @include https://canvas*.institution.edu/courses/*/
quizzes/*/history?*

The wildcard character * is necessary if you want to run on your test and beta instances. If you only wish to run on the production site, then you could leave off the *, but I recommend testing this in your test or beta instance.

By they way, the second include line is for the Quiz Moderation page. If you don't want QuizWiz to run there, you can delete that line.

If you would like to modify the installed script to select different features, you may edit the user script and make the changes. The names of the configuration variables have been chosen to somewhat match the feature with perhaps an exception for ma_correct, which is the partial credit based on the percentage of items correctly answered. There are multiple ways that you could give partial credit, so I felt I needed to include a different word.


There are brief instructions on how to edit the configuration file in the file itself. The second video shows editing a Tampermonkey script.

Updating

The scripts that you install basically contain a configuration and then execute the main program. This is similar to an installation profile where you choose the features you want and then install those. You can make changes to the features after it is installed.

The decision here was to manage one version of the code while allowing people to use it as they desire. By separating the configuration from the code, it makes it easier to accomplish this. This approach also allows me to make bug fixes and have them automatically appear on your end while preserving any changes to the configuration that might be lost if I tried to put everything into one file.

The QuizWiz engine is fetched by the installed script when you visit the SpeedGrader page. It only loads the engine once per SpeedGrader session.

The good news is that you probably won't have to do anything to make sure you're running the latest version of the code. If new features are added, you might need to edit the configuration settings or reinstall the script to obtain them, but I'm going to try to keep those breaking changes to a minimum in order to preserve your configuration.

Multiple Versions

There may be a need for multiple versions of QuizWiz. For instance, you may want to grade multiple-answers questions as all or nothing in one course but partial credit in another. This is, of course, totally unsupported at this time. There was a period of about two months where development on QuizWiz was stalemated because I was working on a fancy graphical interface that would allow users to choose their default options for a course or even for a quiz. Once we decided to go with coded configurations, the process picked back up and we finally have a release.

You could change the @name and @include lines in the metadata at the top of the configuration and specify that those configurations run only on specific courses. You would need to obtain the Canvas course ID (available in the location bar of your browser).

Script 1: Run in BIOL 101 course – Canvas course id 12345

// @name        QuizWiz : BIOL 101
// @include https://*.instructure.com/courses/12345/gradebook/speed_grader?*
// @include https://*.instructure.com/courses/12345/quizzes/*/
history?*

Script 2: Run in BIOL 201 course – Canvas course id 56789

// @name        QuizWiz : BIOL 201
// @include https://*.instructure.com/courses/56789/gradebook/speed_grader?*
// @include https://*.instructure.com/courses/56789/quizzes/*/
history?*

You can have multiple // @include lines, so if you have multiple courses that need the same configuration, just add extra lines to include those courses. The second include line is for the Quiz Moderation page. If you don't want QuizWiz to run there, you can delete that line.

Another solution is to use one browser for one configuration and a different browser for another. You could also use two separate computers like a desktop and a laptop or the home computer and the office computer.

References

The original intent was to have a system that would speed up the process of manually grading mathematics homework by reducing the number of clicks needed in SpeedGrader. From there, it grew to include some other requests that had been made in the Community.

Canvas marked many of the advance to next user requests as deployed with the 2016-08-06 production release, referred to as SpeedGrader 1.25 in Canvas Studio: Speedgrader™ Facelift, but that was just a layout redesign of SpeedGrader and doesn't actually advance to the next user.

137 Comments
James
Community Champion
Author

@LindsayAbraham 

What Ron ( @Ron_Bowman ) said.

If you set it to autorun, then you can just open up a quiz in SpeedGrader and click the Save and Advance button (the > button) and click through every student in the class. If you set it to enabled, you have to manually click the button at the top to apply it and then click the Save and Advanced button.

I would encourage you to consider if that's really what you want. I consider the method flawed because it will award credit for not answering the question at all. It might be the right method to use if (1) the instructor thought they were giving a bunch of true false statements around a stimulus -- that's not the way multiple answer questions work, (2) the student actually answered the question -- not always a given, and (3) students understood that it was supposed to be a mark all correct responses -- I have students who think it's multiple choice no matter how many times I tell them otherwise.

LindsayAbraham
Community Explorer

 

That did it- thank you so much @James and @Ron_Bowman ! I will pass this information and pros/cons of the different methods along to the interested faculty members at my institution!

 

ChrisMedina
Community Participant

Hey James has there been reports of this not working after the last chrome update? I have and instructor that uses it and when using speedgrader and changing grades it does not apply. disabled it and now it works. 

thanks for any info you can provide to get it to work again. 

Ron_Bowman
Community Champion

@James @ChrisMedina 

James -

I just tried it out, and it does appear that the latest version of chrome makes quiz-wiz inoperable.

Thanks for all you do for us James.  I hope it is an easy fix and that you will have time to fix the issue sometime in the near future.  I am just glad that google chrome does not automatically update for me - so I still have computers I can use for speed grader - or just use firefox I guess.

James
Community Champion
Author

@ChrisMedina , @Ron_Bowman 

I have not received any reports of it not working after the latest upgrade to Chrome. I just went in and updated my Chrome from version 98 to version 99 (64 bit on Windows 10) and it seems to be working fine for me.

Can you provide more details about what isn't working? I'm not sure what you mean by "when using speedgrader and changing grades it does not apply." Are you talking about changing a grade within a quiz, changing a grade on the SpeedGrader side (the right side) ??? What is it exactly that you're trying to do that isn't working?

I tried both the standalone version and the rubric version that downloads the engine from AWS and am not seeing any obvious problems. But since I don't understand what you're saying isn't working, I'm not sure that I'm looking in the right spot.

Ron_Bowman
Community Champion

@James -

I will look at it again tomorrow at school where I updated chrome.  What I was seeing is that i entered in grades for questions and when I hit the arrow to save and advance it did neither.

I actually had quizzes to grade, so I tried quiz-wiz on my laptop.  I was seeing the behavior below before and after updating to the latest version of chrome.

First time into speed grader quiz wiz worked. advanced to second student.  quiz wiz would not work.  I could do the standard way of entering a grade in the top box, updating the scores by clicking on update and then having to advance the student using the way canvas provides.  On the third student quiz wiz does not work; however, if I reload the page, quiz wiz works, I advance to the next student and quiz wiz does not work.  reload the page quiz-wiz works

Not sure if that helps any, but I now know how spoiled I am to quiz-wiz

James
Community Champion
Author

@Ron_Bowman 

That helps now that I know you're working on an actual quiz and not just the SpeedGrader stuff on the right.

It does not appear to be a problem related to the update of Chrome. Perhaps that just caused people to notice it, but I'm seeing the same behavior in Firefox that I am in Chrome. That means that it is more likely that something changed in Canvas than the browser. How long ago that changed is unknown to me. It was doing the same thing in the test version, so it may be that it has been broken since February 16 and no one said anything. There was also a deploy on March 2, which doesn't appear to be related, but you never know for sure because they don't document behind the scenes thing. There is a known issues with an ominous title of "SpeedGrader grades do not save when tab closed immediately after in Chrome/Safari" that might be related.

I would have to rely on people who actually use it to know when it stopped as all of my quizzes are completely self-grading right now so I don't use the quiz portion to know how long it's been broken. In the big picture, it doesn't matter when it broke because I will hopefully have it fixed before someone can tell me exactly when it broke so I can look at the source code changes to see what might have caused the problem.

My experience matches yours. What I am experiencing is that it works properly for the first student loaded that actually has a quiz submission (if it loads an a student with no submission, you can scroll through to find one with a submission and it will work for the that student). Once you move off that student, whether by my extra functionality or by Canvas arrows, then it stops working. If you reload SpeedGrader, it will work on the first student loaded that time. But if you move from the first student to another, even if you come back to the first, it stops working.

The script is obviously running as the buttons appear and the ability to change the point values show up. However, it acts like the event handlers and possibly mutation observers are not getting handled correctly when the iframe containing the quiz is changed.

No error messages are being logged to the developer tools console to help pinpoint where the problem lies, but at least I have an idea of where to start looking. I haven't made any major changes since I wrote it, so I will have to refamiliarize myself with the code. I have to teach all day on Friday, so unless it's something really simple that I find before heading to bed tonight, it may have to wait until Saturday.

In the meantime, you don't have to disable all of QuizWiz. You can still use the extra functionality for the rubrics and the SpeedGrader portion on the right. Also the Update button at the bottom (the original one that Canvas puts in) still works.

But yes, I know what it's like to grade without QuizWiz. I had to do some grading on my classroom computer the other day (I just got a new classroom last week) and it was such a pain having to do all that extra clicking.

Ron_Bowman
Community Champion

@James 

glad the information I provided helped.  A lot of what you said (more eloquently than me) is exactly what I was seeing.  I don't remember when I last used quiz-wiz, but it wasn't that long ago - I just checked, and I last used the enhanced part on the nice date of Feb 15Th.  Right at the point you mentioned.  I have graded quizzes, but there were none that I had to go in and grade essay responses.  The rubric portion was still working then and it still is now - which is good because I am using the rubric grading more than quiz wiz at the moment.

 

DanielBagley
Community Member

@James @Ron_Bowman 

I started encountering this problem yesterday, though I hadn't graded for a few days prior. It isn't a solution, but if you can't bear grading without QuizWiz, I found that reloading the page on each new submission causes the same effect as loading speedgrader; it works once and then not on another student. So I've been loading each submission twice, which isn't optimal but still workable.

Ron_Bowman
Community Champion

@DanielBagley -

Yes.  I know of that.  I just do it the regular way - it is not any slower or faster than reloading the page (well maybe a little slower).  

I am not too worried about it right now - I do not have any quizzes to grade, but it could get a lilttle more difficult in a week or so.  Of course I can have my grader grade the quizzes for me if I want.

James
Community Champion
Author

@DanielBagley , @Ron_Bowman 

Here's an update. I've spent most of my free time over the last couple of days looking into it. I've refactored the QuizWiz source completely to eliminate any warnings that a linter gives about bad code. I've taken complicated blocks and reworked them to be simpler. I've used the more modern JavaScript notation. I've also rearranged all of the code so that if I wanted to make a pared down SpeedGrader only version (once classic quizzes are deprecated), it would be easier to do.

I still haven't been able to figure out how to fix the problem, though.

I think the problem is related to sentry. This is a recent change to Canvas that tries to track when errors happen and report them back to Canvas. In a way, this is good because perhaps now they will be aware of things that are going wrong. In another way, it's bad, because local developers won't be able to see when their code goes wrong.

Anyway, sentry completely intercepts all calls to addEventListener that involve click or keypress events. In theory, it then calls the eventListener that the user added.

The event handlers are getting added to the update and update and advance buttons inside the iframe. When I look at the event handlers in the Chrome developer tools, they are there twice, both having a source of instrument.js, which is where the sentry stuff is. They are not firing after you move off of the initial student.

The event handlers for the SpeedGrader side still work. The difference is that the part that does not work is inside an iframe while the part that does work is in the document. That strongly suggests that the iframe is playing a part in it as well.

I thought it might be an issue related to loading sequence, but I added a sleep (with a promise) that waited to make sure my script was running a second after the iframe loaded and it didn't help.

I'm still looking into it, but I'm not getting much of anywhere.

James
Community Champion
Author

Thanks to Ron ( @Ron_Bowman ) who pointed out other people are experiencing issues with content in iframes not working. There are several similarities and what I read there is consistent with what I'm seeing here. It looks like Canvas implemented Sentry and it doesn't work right with iframes.

That doesn't mean that I'm giving up trying to find a solution, but it may be something that has to change on Canvas' side.

James
Community Champion
Author

@DanielBagley , @Ron_Bowman 

I made some progress tonight and was able to get QuizWiz working again. However, I made substantial changes to the code (I basically rewrote the whole thing) and need to do a bunch of testing before I release it.

The problem is definitely Sentry related. I found where Sentry stored the original addEventListener() function and wrote my own code that called it instead of theirs. It started working again.

I have to teach all day Wednesday and then I want to test. Ron has volunteered to do testing as well [thank you]. Hopefully we can get something out by Sunday (next week is my spring break and I will be gone a couple of days starting Monday).

James
Community Champion
Author

@ChrisMedina , @DanielBagley , @Ron_Bowman 

I retrofitted the changes to make QuizWiz work with Sentry to the existing version so that I could get it out quickly to people. I have updated the standalone version and the qw-engine version that gets called by everyone who hasn't installed standalone. In other words, the new version is live if you are using one of the named installs and you will need to update the code if you're using the standalone version.

This brings the standalone version to 5.2, but the other versions stay at 5 since they load the engine every time SpeedGrader is invoked and so the installer code itself didn't change.

If you look at the code, it will look like a lot of changes, but that's mostly due to the formatter I used. I've switched to vsCode and am using Prettier and it went through and removed the quotes from all the method names. The changes themselves are limited.

If the code detects sentry, then it will get the original addEventListener from it and use it. If it doesn't detect sentry, then it will just use the existing addEventListener. I then call my version of the original code instead of the one on the element.

There may be a cleaner way to do this, but it works in my testing on Chrome, Firefox, and Safari. Rumor has it that Windows has another browser.

I still have a major rewrite in progress but it is going to take more testing before it's ready to go.  "Wait and see" isn't really my thing if I think I can crack it unless I think an solution is imminent. Canvas is supposed to release a fix on March 16 for the issue with the Rich Content Editor in classic quizzes. I tested my old code against the beta instance (that supposedly already has the code in place) and it didn't fix the issue. If it turns out that Canvas ever does fix sentry to work with iframes, my code should still work because it's not using it sentry. If Canvas stops using sentry all together, my code should still work because it will just fall back to the browser's native version. If Canvas doesn't fix sentry and the location of the original changes within sentry, my code will break.

Thanks to Ron for helping me track down the issue and doing some testing. Sorry it took a week to track down the problem and fix it.

Ron_Bowman
Community Champion

@James -

I tested it a little in firefox, in opera - it works and in chrome it works.  I never use the full points, ma_allnone, ma_correct, ma_difference, fill_in_the_blank or dropdowns regrade options.  I tried out some of those and they appeared to work.  Fill_in_the_blanks may not be working correctly.  For a quiz I have with it, all the answers are boxed in a red square (even correct ones) and there is no regrade button at the top(if there was supposed to be one, I don't see it - this is in opera and chrome.

As far as I can tell James has worked magic once again and everything appears to be working with the main part of quiz-wiz rubrics.  saving, and advancing works and the comment box expands.

I checked my original install version, and it is working as James mentioned.  Everything is right with the universe again.

On the side, I noticed one thing in my testing - previously, I was able to remove scores from a quiz question and get the dashes back.  now when I do it, I get NaN (Not a Number) - this is unrelated to quizwiz and is a canvas thing.  I never noticed the NaN before.  I can get it to go awayby reloading the page, but updating the scores after removal of a score does not.

Thanks again James for all you do for the rest of us.

 

CassandraSiler
Community Member

QuizWiz just stopped working for me in the middle of the night last night. I tried downloading/installing a new version of QuizWiz, updating Chrome (upon reading this forum, maybe I shouldn't have done that?), etc, my usual fixes. I still get the red flag indicating that it's running from TamperMonkey, but I don't see any of the effects of QuizWiz (I'm trying to autorun the full credit). Any ideas?

James
Community Champion
Author

@CassandraSiler 

There was a June 8 deployment to Canvas, so it's possible that some things in my script broke. It didn't specifically mention SpeedGrader or Classic Quizzes, but sometimes things happen behind the scenes that are unaware.

I have a test quiz that I use to assess whether QuizWiz is working. I changed full_points to autorun and loaded up the quiz inside SpeedGrader and it shows that there was 1 question with full points and that it was automatically assigned the points. I double checked the quiz question and it shows correctly. That grade isn't updated until I click the Update Scores or the Update and Advance button. This was with the latest Chrome (102) on Windows.

In other words, I'm not able to duplicate what you're seeing. That means that I can only provide generic suggestions.

Did you double check that the red badge on Tampermonkey is for QuizWiz and not some other script? The number on the Tampermonkey badge should be at least 2 when you're viewing a classic quiz as it runs twice (once for SpeedGrader and once for the Quiz).

When you say that you don't see any of the effects of QuizWiz, are you seeing the extra buttons QuizWiz adds at all or is it just not working for the full points?

I used to be able to have people look at the Developer Tools console tab for glaring red error messages, but Canvas has deployed Sentry and now the error messages go to them rather than the screen. That limits what I can do unless I can duplicate the problem.

CassandraSiler
Community Member

Thanks so much for your response! Looks like in my trouble-shooting I messed something up-- I'm a canvas.institution.edu person, and I noticed that QuizWiz had the original version, so I changed it last night to see if that would help things. It didn't, but just now I took out the . from https://*.canvas.institution and now it's https://*canvas... and now it's working again (?!). Just in case it helps someone else. For what it's worth, it had been working before, and I had only had the 1 red flag from Tampermonkey... now I have 2! Doesn't really explain why it was working before  or why it stopped, but the important thing is that it's working again now! Thanks again!

James
Community Champion
Author

@CassandraSiler 

I'm glad you got it working.

There are two include lines in the metadata at the top. One is for SpeedGrader and the other is for the Quizzes. Both need modified to work completely. The SpeedGrader enhancements are what I suspect that most people use QuizWiz for.

If you're using a custom domain (canvas.institution.edu vs institution.instructure.com), which it sounds like you are, then you will definitely need to modify those include lines. The *.instructure.com matches institution.instructure.com, institution.test.instructure.com, and institution.beta.instructure.com.

Putting a * in front of the canvas probably doesn't do what you think it does, so I wouldn't be able to recommend that to others without knowing their particulars. It would allow for  canvas.institution.edu, but also icanvas.institution.edu, johncanvas.institution.edu, test.canvas.institution.edu, and beta.canvas.institution.edu to all work as well. icanvas and johncanvas are not likely to be actual hosts at your institution, so they won't matter. I don't where people put the beta and test for custom domains, but if they put it in front, then your suggestion works.

Putting canvas.*institution.edu should allow for canvas.institution.edu, canvas.test.institution.edu, and canvas.beta.institution.edu, but not icanvas.institution.edu or johncanvas.institution.edu.

That's all for now, but it may change at some point. When I edit scripts, Tampermonkey is showing a warning that the include has fallen out of favor and I should switch to match instead. They work similarly, but include allows regular expressions, which makes them slightly more powerful (and easy to mess up). I don't know when that change will happen. It also changes things since you cannot have a .* in the middle of a match. *.instructure.com will still work, but if you have canvas.institution.edu, canvas.beta.institution.edu, and canvas.test.institution.edu, then you would need three lines if you want to use match (or 6 in the case of QuizWiz). However, if your sites are canvas.institution.edu, test.canvas.institution.edu, and beta.canvas.institution.edu, then *canvas.institution.edu match all three.

The good news is that if you don't ever use the beta or test instances, then you don't need the * at all and you can just put canvas.institution.edu for the host portion.

jlmasters
Community Participant

QuizWiz stopped working for me earlier in the week. I am running the Standalone with Speedgrader. I have unanswered set to autorun, full_points set to enabled, all other regrading set to disabled, and all of the speed enhancements set to true. When I am in Speedgrader, it looks the same as if I was not using QuizWiz at all. Similar to the person who posted above, I tried to uninstall and reinstall and update chrome. 

I did notice that if I disable the two grading options, the speed enhancements then start working. But if I have either of those set to enabled or autorun, then nothing seems to work.

I appreciate any help you can offer! Thanks in advance.

CassandraSiler
Community Member

Thanks for the explanation! That's really helpful.

James
Community Champion
Author

@jlmasters 

As with the other user, I am unable to duplicate what you're seeing. I set unanswered to autorun, full_points to enabled, the rest of the quiz options to disabled, and all speedgrader enhancements to true. SpeedGrader enhancements worked fine.

Double check to make sure that you don't have it installed and enabled twice. It's possible that your institution added it for everyone at your institution, so when you have it running, it's running twice.

Assuming that it is only running once, can you verify that Tampermonkey is showing that the script is active and the red badge shows at least 2 when you're in SpeedGrader with a quiz loaded.

You can try looking at the developer tool console screen (F12 and then console in Chrome). I'm not expecting to see much since Canvas installed Sentry that traps error messages so they don't go to the console. But if there are red error messages related to QuizWiz, then letting me know about them would be beneficial (innocuous messages like jQuery taking too long to repaint the screen are not helpful as I don't use jQuery for QuizWiz).

jlmasters
Community Participant

Thank you @James! I so appreciate everything you do for us Canvas users!!

I don't have it installed twice.

When I am in SpeedGrader, I see a red badge that shows 1, not 2. 

Below is a screenshot and text-paste of the errors I see in the developer tool. I am not sure if this is helpful or not.

 

master_controls.js loaded
helpers.js:89 Uncaught TypeError: Cannot read properties of null (reading 'insertAdjacentHTML')
at prontoChatClient (embedded.js?cb=1655162872:190:46)
at r (helpers.js:73:23)
instrument.js:109 klAfterContentLoaded()
instrument.js:109 master_controls.js loaded
bugsnag.js:2040 Cannot decrypt memberships undefined TypeError: a.filter is not a function
at APITokens.vue?61a2:308:14
at d (app.js?id=754a42f46a58ac3f0ab4:2:6900244)
at Generator._invoke (app.js?id=754a42f46a58ac3f0ab4:2:6900032)
at Generator.next (app.js?id=754a42f46a58ac3f0ab4:2:6900673)
at h (TextDivider.vue?ab5e:556:55)
at o (TextDivider.vue?ab5e:556:55)
console.<computed> @ bugsnag.js:2040

Screenshot 2022-06-13 193153.jpg

jlmasters
Community Participant

@James Thanks for your response and help. I thought that I responded on Tuesday, but I just came here to post an update and apparently I must have never actually posted the comment. Sorry about that. On Tuesday, I had written that I confirmed that I only had it installed once. When it is running and I am in SpeedGrader, Tampermonkey does have a red badge, but it shows a 1, not a 2. I also took a screenshot of the error console, in case that is helpful. I'll post my update today in a separate message in case that is helpful.

Screenshot 2022-06-13 193153.jpg

jlmasters
Community Participant

This morning, when I changed the status to 'autorun,' it did appear to be back to functioning correctly. But when I set either status to 'enabled,' then it made everything stop working again. I just went to take a screenshot of the error console and now suddenly it's working completely! This is different from just 10 minutes ago!! I've attached the error console anyhow (this is when the two items are set to 'enabled'), just in case it's helpful for some reason. But as of now, I think everything is back to working correctly for me. Thanks again @James for your support and for building and maintaining these amazing tools.

Screenshot 2022-06-16 105957.jpg

James
Community Champion
Author

@jlmasters 

Those errors are from other software and they could be causing problems or modifying the page in a way that breaks QuizWiz. An error in a JavaScript file can cause subsequent code in the file to stop working. QuizWiz is inserted separately through a different extension, so it normally would not be affected by those. However, if those modify the page in a way that my script cannot find the right selectors, then it might be an issue. My wife used Pronto for a while a couple of years ago and she didn't have any problems with QuizWiz, but that doesn't mean something hasn't changed.

If you're seeing 1 instead of 2 on the Tampermonkey badge while you're looking at a classic quiz, then it's possible that you are using a custom domain (instead of something at instructure.com) and need to modify both include lines in the metadata properties at the top.

jlmasters
Community Participant

Thanks, @James. I'm not sure what JavaScript file might be interfering. Unfortunately, it is not working again today- only the speed enhancements work and only if the regrading ones are disabled. It obviously is some sort of issue with my institution or something else on my end. But if you think of anything else I can try, I appreciate any input. It's disheartening how much more time it takes me to leave feedback for my students without the enhancements working! Thanks again.

James
Community Champion
Author

@jlmasters 

I tried setting both of my values to enabled instead of autorun and enabled and I'm still not seeing any problems.

About the only thing I could check is the headers and configuration at the top of the script. Could you send me a private message by going to the Messages (email) button next to your profile avatar near the top, click on the compose button next to the Inbox, and send a message to james. Copy/paste the userscript headings and the config section into the message. Send me a copy of what works and a copy of what doesn't work, but if you can only send one, send the one that doesn't work.

I do check case, so if you put "Enabled" or add an extra space inside the quotes, then it could break things.

I cannot remember whether you told me this or not, but are you running the latest version of the standalone script? It's up to version 5.2 on GitHub. The issues you're having don't sound like that's the problem, but there were some issues with things not working that I resolved 3 months ago.

Neither of those suggestions are consistent with the sporadic working. The configuration might explain why it breaks when you try enabled, but not the sporadic nature. I cannot say for sure that the JavaScript errors from the other programs are causing the problem; only that it be the cause.

Ron_Bowman
Community Champion

@jlmasters -

I did not read through all of your posts as to why you are using the standalone version.  Is there any reason why you don't run the rubrics version and set the various options to what you have in the standalone version?  it might be worthwhile to try out a different version to see if that version works for you - Just a thought I had.

I just used quizWiz rubrics today with unanswered set to auto run, all other regrading options disabled and all the speed enhancements set to true - almost exactly what you are doing (with the exception of full points) and I had no problems.

 

James
Community Champion
Author

@Ron_Bowman 

The standalone version doesn't have to download the version from the net every time you open SpeedGrader. That potentially saves me a little money in AWS fees, but my total bill each month is under $2 (most of that is from Canvas Live Events) so it's not significant.

It also allows people to see the source code. Some people like to know what scripts are doing rather than just trusting them.

I responded to @jlmasters privately with some things to try. One of them was using the rubrics version, mostly to make sure that it's not a timing issue, which would lead into the issue I mention below. There were some other things to try as well.

My current hypothesis is that somewhere one of the scripts being ran by the institution is messing with the page and there is a CSS selector that is supposed to be there (so I don't check that it's there) but isn't. Then I'm trying to operate on undefined or null and it's throwing an error, but because of sentry, I cannot see what the error is.

canvas_admin
Community Champion

I have LOVED using these enhancements for grading assignments. I was curious what your thoughts were regarding New Quizzes. Are you thinking of deprecating this when classic quizzes are deprecated? Are you waiting for the final version to see what all it does before trying to enhance?

James
Community Champion
Author

@canvas_admin 

Sorry for the delay, I just found your comment from September.

I'm not sure where QuizWiz will go with New Quizzes. The delay in enforcing the switch was welcome news. I certainly wasn't going to try to hit a moving target and was waiting for the development of New Quizzes to stabilize. I did start refactoring the code to make it easier to switch or decouple at some point, but I haven't looked at it in over a year.

The SpeedGrader aspect (setting aside the quiz specific portion) should still work as it doesn't care about the content within the iframe on the left. That's where the decoupling effort might come into play. If Classic Quizzes is ever completely abandoned, then I may release a SpeedGrader-only version without the extra complexity needed for Quiz handling.

jlmasters
Community Participant

Thanks again, as always, for these tools which make everything so much better!!

One of my schools received a Canvas update so that now Assignment Speedgrader comment box uses a Rich Text Editor. I think this is long overdue and a great update.

The only downside is that now the "Submit and move to next" button no longer it works- it moves to next submission but leaves the comments as a draft.

Any chance there will be an update for this at some point?

James
Community Champion
Author

@jlmasters 

Thanks for saying something. I've not had to use that button since the deployment yesterday and wasn't aware it was broken. My typical workflow is to save the comment and then use the advance for the rubric so I hadn't noticed it yet.

For the time being, save the comment with the regular submit button and then click the advance. I know it's two clicks instead of one, but I also don't know how long it will be before I can take a look at it or how long it will take to fix. I did encounter a similar circumstance years ago when they first introduced draft mode and worked around it so hopefully it will come back to me once I start digging into it.

I also wish they would make the new mini-RCE box resizable. It's hard to scroll back through to see what I've already typed.

jlmasters
Community Participant

@James Thanks so much. And I completely agree about the resizable comment box- the scroll is very annoying! 

James
Community Champion
Author

@jlmasters 

I've fixed the issue with the submit comment and advance returning a draft state.

It was related to the check to see whether there was a comment or not.

The CSS selector used had changed and it was moved to an iframe. I wrote code that checked for the presence of the iframe and then got the text of the comment from the appropriate (old or new) location. I left the old one in there in case some people are self-hosting and don't have the latest update.

You may need to force QuizWiz to update the source code before the change is recognized. If you're using a version that downloads the source from my AWS site, then a force-reload (Shift+reload) of the browser page should work. If you're using the standalone version, you may need to go into Tampermonkey and select Utilities > Check for userscript updates.

jlmasters
Community Participant

@James Amazing, thank you so much!! 😁