Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
TristanEifler
New Member

Cannot Edit Quiz Answers in HTML (Glitch)

I am an instructor teaching an asynchronous online course.

I'm experiencing the glitch in Chrome (and other browsers) where, if you attempt to edit a quiz answer in HTML - the 'Toggle Editing answer text in HTML' button - (necessary for superscript and subscript options, which I do need since I teach chemistry) the browser simply jumps up to the top of the page. This suddenly started happening while I was working on a quiz. Logging out, closing the browser and reopening it doesn't seem to help. 

I've seen others report this issue but there have been no solutions or responses from Canvas support. I am currently writing my final exam and this is a major issue; I'm not 100% I can complete it in a satisfactory fashion at this point. Please advise. 

Labels (1)
0 Kudos
17 Replies
bowmanr
Community Champion

@TristanEifler -

Is this in new quizzes?  I just checked in classic quizzes with a quiz I have and the toggle does not jump me to the top.  Of course if it is intermittent on your end, that does not mean anything in my test.   

However, your reason for wanting to go to html mode caught my eye.  The RCE in classic quizzes has a way to do sub and super scripts with an icon it is the T with a 2 superscript.  So unless you are doing something fancy with your sub and super scripts I do not see the need to go to html view.

This reply is probably late for helping you this time around.

Hopefully I understood your question/problem.

limbriae
New Member

I am experiencing this problem, too. I'm only able to enter text for answer choices. Previously, I could click the pencil on the right and use the equation editor to create answer choices (Algebra I). It is no longer working.

0 Kudos

I am having the same issue.  I am trying to write a rational functions test.  I am able to use the latex in the question, in the reason why an answer is incorrect, but when toggled in the answer, the cursor goes back to the question.  It does NOT allow me to use it at all in the answer, making this a useless quiz.  Can you please offer a suggestion to fix or an alternative.

 

Thanks

0 Kudos
James
Community Champion

@dcochran419 

You asked for an alternative. Since you know LaTeX, you can enter the LaTeX directly into the plain text response field by enclosing it in \( and \).

For example: \(f(x)=\dfrac{x+1}{(x-2)(x+5)}\)

It won't show up properly when you type the response, but after you update the question and save the quiz, then when you come back in, it will display properly. It also shows properly when delivering the quiz to students in a browser. It also shows up on the quiz analytics, where it wouldn't if it was an image.

Canvas made an announcement over a year ago that LaTeX was supported everywhere, even in titles of assignments or messages sent to students (as long as you're viewing in Canvas, not in their personal email).

The last I checked (December 2021), they still did not work in the Canvas Student App. I tell my students not to use the app to take quizzes, write discussions, (or really do anything serious with Canvas) but to use a browser, even if it's a browser on their mobile device.

0 Kudos
bsmaples
Community Participant

This is happening in our institution since last week, specifically when utilizing the Chrome web browser. Our current workaround is to switch browsers to Firefox until the root issue is identified and corrected.

I've never written on any of these boards but had to say thanks! After hours of checking the forums and researching your tip helped.  No one in our org had been able to find a workaround, this worked! Using Firefox was the way to go. 

chadscott
Community Contributor

Howdy,

This has been happening at our institution as well for about a month now. It wasn't reported until yesterday though and when I attempt in BETA - it works fine. The only difference i know of in BETA that affects the RCE is the updated equation editor. I've got a ticket in with support now.

I'm telling users to use Edge (we don't allow Firefox) to edit their answer choices until a fix is released.

Cheers,
Chad Scott

DanielDyar
New Member

Happening in Chrome (Version 99.0.4844.51) (although it worked briefly earlier today). I cleared cookies/cache/everything.

Switched to MS Edge and it worked-- for one question.
Now Edge is failing the same way (scrolls to top).

chadscott
Community Contributor

Howdy,

You are right. It is failing in Edge now as well. Canvas support came back and said it's our custom JS/CSS file.

I've tried -

  • Removing the JS file and leaving the CSS file - fails
  • Removing the CSS file and leaving the JS file - fails
  • Removing all code from the JS file except 1 script - fails
  • Removing both files - works once or twice and then fails again

I'm responding to the ticket and including this thread as well.

Cheers,
Chad Scott

James
Community Champion

I am experiencing a similar issue with other things. I haven’t tried editing quiz questions, but the scenario being described is close enough that Ron ( @bowmanr ) pointed this thread out to me (twice). The first time I didn’t see the similarity as much, but now I definitely do

My problem was with QuizWiz. It’s a userscript I shared that speeds up SpeedGrader and classic quizzes within SpeedGrader. It has been working pretty flawlessly (other than choosing a bad CDN provider) for about 5.5 years years without any major changes. Last week, a couple of people said that it stopped working.

What stopped working was the quiz side of things. The SpeedGrader enhancements still work, but the parts that enhance classic quizzes stopped. More specifically, it stopped working after the first student. It would work for the first student but then not.

I spent a lot of time this weekend researching the problem. Although both are related to classic quizzes, I don’t think classic quizzes is the issue. What I think is the issue is that they both have event listeners within an iframe. Mine are when buttons are clicked, but the Rich Content Editor that allows you to edit the HTML question is inside an iframe as well.

I did a major rewrite of QuizWiz over the past few days. I removed all of the lint problems that showed up, refactored complex code into simpler functions, switched from using var to const and let, used arrow functions when possible, etc. None of that fixed the issues.

I’m seeing the problem in every browser (people originally thought it was related to the Chrome update), but not every browser simultaneously breaks at the same time. That strongly suggests that it is something that Canvas did. But classic quizzes aren’t being developed anymore, so what could they do that would so drastically break things?

In my testing, I noticed that Canvas is now using Sentry. That’s a recent change, probably about the time this started happening. From what I can tell, it is intended to find errors in the code and report them back to Canvas with enough information that they can hopefully figure out what is going on. If you open the developer tools in your browser and look at the network tab, you will now notice a sentry_entry that wasn’t there prior to these problems.

One of the things that Sentry does is replace the addEventListener with their own code. When someone adds an event listener, it intercepts the call so that their code is called. If you open the developer tools console and type addEventListener, you’ll see what I’m talking about. The small portion of the code that is shown first checks to see if the event is a click or keypress. All of the buttons that I add are click events and many things in the RCE would be click or keypress.

In theory, this shouldn’t cause any problems because our event listener is still called. In theory, it should be great for Canvas because now they can see when problems happen, rather than having to rely on users to report them.

Theory isn’t reality, though. Any errors in third party code are now silent. If I mistyped a keyword, it used to throw a big error message in the console letting me know. Now, that gets captured by Sentry so I cannot see what it is. It makes developing our custom JavaScript harder without those messages.

Then there is the whole iframe issue. My event listeners in the main Canvas page do work. It’s the ones that are in iframes (the RCE or the classic quizzes in SpeedGrader) that do not work. They work correctly the first time, but when the iframe is reloaded (moving to another student or opening a new RCE) and the listeners are re-added, they don’t work.

I cannot say with certainty that Sentry is the culprit, but everything I’m seeing and what people are writing here is consistent with that being the cause. It is global across browsers (I haven’t checked Safari). It affects iframes. It works right once but not after that. It only recently started happening.

My current working theory is that something about Sentry and iframes is broken. It's not classic quizzes, it's not the Rich Content Editor. Focusing on those things is wasting time.

I didn’t see anything in the release notes about sentry being deployed (granted, I may have just missed it). It’s not forward-facing, it doesn’t change the desired behaviors, so they shouldn’t need to tell us about it. Except that it is a very invasive and major change that has the potential to break a lot of everything because it takes over the browser’s addEventListener completely.

In some ways, seeing that other people are having issues with iframes is a relief. While I’m sad other people are having problems, it means that it might not be my code was broken. That means that I can stop staying up all night trying to fix it and work on other things.

bowmanr
Community Champion

@James -

Thanks for the great write up as usual.  I guess I really wanted you to look at this post for telling you about it twice.  In my defense, I hurt my back in January, and I am still trying to get that matter resolved.  My back allows me to sit and stand, but not lay down. So Sleep is not as good or as plentiful as it should be (that's my excuse).  In any case it will be interesting to see what comes out of this matter with Canvas.

 

0 Kudos
James
Community Champion

Ron, the twice thing was more of a comment on my ignoring it the first time than any deficiencies in your memory. I looked at it the first time, but missed the connection as I wasn't doing anything with the RCE or classic quizzes per-se and so I dismissed it. After some of the others started chiming in with their comments and you told me to look at it, it became more apparent that the issue might be the same. Thanks to your persistence, I was finally able to see the fuller picture.
0 Kudos
James
Community Champion

I confirmed that my problem was definitely Sentry related. I found where Sentry stored the original addEventListener() function and modified my code to call the browser's addEventListener() function instead of Sentry's. With those changes, I was able to get my event listeners in QuizWiz to work within an iframe.

I still have some testing to do before I release an updated QuizWiz as I did a major rewrite of the code and probably broke something else. I've also only tested it so far with Chrome 99 on Windows. But I can joyously confirm that it started working again once I bypassed the Sentry code.

Of course, I cannot change the code that the RCE uses as that comes from Canvas to fix this issue for the rest of you. But my success with QuizWiz adds further evidence to the hypothesis that Sentry is to blame.

bowmanr
Community Champion

@James @chadscott 

James - Maybe with the information that Chad mentioned about a fix coming for the editor issue on the 16th, maybe that means the issue with quiz-wiz will be fixed as well.  I guess we just have to wait and see.

 

0 Kudos
James
Community Champion

@bowmanr 

The "fix" that @chadscott mentioned that is in beta does not fix the issue I'm having with QuizWiz.

There was a fix that @Shar gave in another thread about the RCE and it being a jQuery issue. That might have been the fix that Canvas deployed, I don't know.

Since it doesn't fix my issue with iframes and event listeners, I suspect they're treating the symptoms rather than the cause (jQuery causes an issue so let's fix the jQuery rather than fixing the sentry that is causing the issue). That is, I suspect that the jQuery doesn't get tricked by sentry, but that doesn't fix the people who aren't using jQuery and it isn't a long term solution since Canvas is moving towards react and away from jQuery.

I would love to be wrong, though. I cannot be the only person using event listeners in an iframe, can I?

0 Kudos
James
Community Champion

It turns out that sentry may not have been the immediate cause of the glitch with editing classic quizzes. Canvas stopped loading jQuery in the Rich Content Editor.

In production, if you go to edit a page, switch to the iframe that holds the quiz content for the RCE, and type $().jquery in the console, you see jQuery is not installed. If you do the same thing in beta beta, jQuery is present.

So the fix that seems to be coming involves making sure jQuery is loaded in the Rich Content Editor.

That is a different issue than QuizWiz was having. jQuery is being loaded within the SpeedGrade iframe when viewing the quiz and QuizWiz doesn't use jQuery at all. Two different problems with similar symptoms confused me. Sorry for any confusion.

0 Kudos
chadscott
Community Contributor

I've heard back from Canvas Support and my suspicions were true. Because the issue was not happening in BETA, I figured they had deployed a "quiet" fix for the issue. 

Canvas Support added my ticket to an internal one and said the fix was available in BETA and will be deployed in the 3/16/22 Canvas Deploy. They said in the meantime, to use Firefox (which we can't use in our district).

Anyway - glad a fix is coming, but perplexed about the non-transparency or documentation of the issue in "known issues", etc.

Cheers,
Chad Scott