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

Less than and greater than symbols not appearing in Quiz Summary

Jump to solution

Students see less than (<) and greater than signs (>) in quiz answer choices. However, the Quiz Summary often removes them completely from the answers.

For example, here's a question with < and > characters in the answers:

canvas_students.png

In the Quiz Summary, the < and > are removed from answers:

canvas_quiz_summary.png

As you can see from the screenshot above, every answer looks identical because of the < and > removal. There is no technical reason why Canvas needs to remove these characters (they can easily be escaped as &lt; and &gt;).  

This bug has been around for years. I would love to see it finally addressed.

0 Kudos
Reply
2 Solutions
fmccown
Community Participant

Canvas Support told me they will not fix the problem... I should use New Quizzes instead, which does not have this bug.

View solution in original post

0 Kudos
Reply
James
Community Champion

@fmccown 

I had looked at this issue before when we discovered that Canvas was removing math equations images (which were wrapped in <img> elements at the time). That was worse than what you had because there wasn't anything there but the image and so nothing showed up in the quiz statistics.

2022-02-15_18-13-14.png

However, in other cases where I have < or >, I can get them to show up for me.

2022-02-15_18-28-42.png

Now this is on a multiple drop-down question, where only text (no HTML) is allowed.

That got me thinking, so I did some checking. I created a multiple choice quiz and created answers that had < in them. One was as straight text and the other was using HTML via the Rich Content Editor (RCE). One response was "Less than < text only" and the other was "Less than < HTML"

Here's what it looks like in the Quiz Statistics.

2022-02-15_18-36-16.png

The < was stripped out of the RCE version, but not the straight text.

Since you have nothing fancy in your responses that would require HTML, you could just use the text-only version and get it to render. I verified that the quiz statistics uses the latest version of the question, so you could go back and edit the questions move the text out of the RCE into the plain text box (you will need to edit the RCE version and select and then copy/cut the text so the RCE is blank. Then close the RCE to get back to the plain text box). It doesn't change the student answers, but when you view it in the Quiz Statistics, then it shows up.

The same applies to the Student Analysis. It strips out < and > from HTML answers but leaves them for plain text answers.

View solution in original post

7 Replies
Chris_Hofer
Community Coach
Community Coach

Hi there, @fmccown ...

Have you reported this to the folks at Canvas Support?  That is where I would recommend you report this so that they can get the issue reported and so that Canvas software engineers can take a closer look at things to see if something needs to be fixed.  A ticket will be created for you, and then you'll be updated as they know more information.  How do I contact Canvas Support? - Instructure Community (canvaslms.com)

Please keep us updated on this and report back if you get any information from Canvas Support...thanks!

0 Kudos
Reply
fmccown
Community Participant

Good idea, @Chris_Hofer. I have submitted a ticket and will report back on what happens.

fmccown
Community Participant

Canvas Support told me they will not fix the problem... I should use New Quizzes instead, which does not have this bug.

0 Kudos
Reply

@fmccown …

Thanks for coming back to provide an update.  Yes, current Classic Quizzes isn’t being worked on any longer by Canvas engineers…as they are spending their resources on New Quizzes.  I’m glad you were able to find out that New Quizzes does not have this issue!

0 Kudos
Reply
James
Community Champion

@fmccown 

I had looked at this issue before when we discovered that Canvas was removing math equations images (which were wrapped in <img> elements at the time). That was worse than what you had because there wasn't anything there but the image and so nothing showed up in the quiz statistics.

2022-02-15_18-13-14.png

However, in other cases where I have < or >, I can get them to show up for me.

2022-02-15_18-28-42.png

Now this is on a multiple drop-down question, where only text (no HTML) is allowed.

That got me thinking, so I did some checking. I created a multiple choice quiz and created answers that had < in them. One was as straight text and the other was using HTML via the Rich Content Editor (RCE). One response was "Less than < text only" and the other was "Less than < HTML"

Here's what it looks like in the Quiz Statistics.

2022-02-15_18-36-16.png

The < was stripped out of the RCE version, but not the straight text.

Since you have nothing fancy in your responses that would require HTML, you could just use the text-only version and get it to render. I verified that the quiz statistics uses the latest version of the question, so you could go back and edit the questions move the text out of the RCE into the plain text box (you will need to edit the RCE version and select and then copy/cut the text so the RCE is blank. Then close the RCE to get back to the plain text box). It doesn't change the student answers, but when you view it in the Quiz Statistics, then it shows up.

The same applies to the Student Analysis. It strips out < and > from HTML answers but leaves them for plain text answers.

fmccown
Community Participant

Thanks for your response, @James. I will definitely try that in future quizzes.

Unfortunately, the questions are imported from test bank, and the import automatically sets the answers in HTML format. Canvas doesn't have a way to convert an HTML format answer back to a text answer (that I can tell) without me manually deleting the HTML answer and adding back the answer as text. I wish it wasn't so time-consuming to fix the issue.

0 Kudos
Reply
James
Community Champion

@fmccown 

This isn't the first time I've come across things in Canvas that people assume will work one way just to find out that it doesn't and there's no easy way to fix it. These are things that aren't documented, or that people wouldn't even think to go looking for exceptions because it seems like it should be intuitive. In Canvas documentation, they use the premise that if we don't say it will do something, then anything can happen. Since we didn't say you could have HTML text with < > in it, we don't have to support it when it doesn't work.

You're right in that it could be escaped if it's not part of a HTML tag. That's an over-zealous code stripper to think that every < or > is part of an HTML element.

As for fixing it, you are again correct that it requires manual intervention. That's not going to be be easy and you'll have to decide whether it's worth the time to fix it. I haven't tried to fix the issue of the non-text because I don't find the quiz statistics to be all that helpful anyway and Canvas is in the process of deprecating class quizzes so any fixes would be short-term solutions.

I also don't use question banks; there are too many limitations with them -- one of the biggest being that there is no API support for them, everything has to be done through the web interface and not programmatically. I've started working more with Puppeteer and Chrome to program things within the browser, so that might be an option. Another one would be to write a userscript that injected JavaScript into the browser that allows you to programmatically access the question bank questions.

I didn't know the key was using plaintext until I looked into this for you.

As a math teacher, the only time I ever really used the Rich Content Editor (RCE) was for questions that I needed to format as math content. Now that Canvas supports math content everywhere (except the mobile apps), I have been putting the LaTeX directly into the plain text input field rather than the RCE, so the effect for me would be minimal. I still have about 8 years worth of questions prior to that universal LaTeX support that aren't upgraded, but I'm not rushing out to change all of those because there are benefits to using the RCE and the only downside (so far) has been the lack of quiz statistics.

0 Kudos
Reply