How do you add multiple line answer options to multiple choice questions.
If you're using classic quizzes, then click on the pencil at the right of the response and it will open up the Rich Content Editor. That should address the issue of multiple-line answers.
It will allow you to put in Java code there as well as you could anywhere in Canvas (which isn't great). You might want to make the text use the preformatted style, which uses a fixed-width font. Many years ago when I last tested this, I had to choose Preformatted, then view the HTML source, and then paste the code in between the <pre> and </pre> tags.
If you open up the HTML editor and paste it between <pre> and </pre>, it comes out much cleaner looking internally. I even put a blank line after me opening <pre> so that it looks good to me, but it appears that Canvas strips that leading blank line.
For the students, there's no visible difference, but the first one won't copy/paste cleanly and retain the line breaks while the second one will. The first one either has no line breaks (notepad) or no indentation (Word) when pasted. The second one comes through correctly in notepad bu has no line breaks in Word.
In New Quizzes, every multiple choice question already has the Rich Content Editor selected, so there is no need to click on the pencil first.
Hi Brian. Could you provide an example of the type of question you wish to ask? Generally multiple choice questions are designed to have the question stem and list of possible answers students select from (only one, all that are correct, etc.). Perhaps a different question type would be more useful in your situation.
I also have the same question as above and my example would be wanting to provide a snippet of Java code as answers. Such as a for loop with executable lines under it.
Thanks for the help. I saw the pencil for the question and opened the HTML, but for some reason I missed that option for answers.
Thanks for this very useful information. I have been wanting to know how to easily put formatted code into a quiz. I never pursued it very far, but this helps a lot. One question - do you know how to change the tab setting from 8 spaces to 4 or 2 in Canvas? I am thinking that the functionality to do that in html has been stripped from the html editor that they provide.
Canvas does not convert tabs to spaces for you. It's a text editor, not a programmer's editor, and just treats a tab as a U+0009 (character code 9). There is a tab-size CSS property that defaults to 8, but it would control it. You cannot enter that into your HTML, though, as it is not supported by the Canvas HTML Whitelist.
It appears supported while you're using the Rich Content Editor, but it is stripped out when saved.
but when you save it, it becomes
The reliable way to get the desired indenting is to use spaces rather than tabs, although that may break people's ability to copy/paste functioning code (probably not a high priority for a quiz).
Most Code Editors have an option for configuring this or there are normally online code formatters that will allow you to paste your code and then beautify or format it and many have configuration settings.
And that can be changed to other flavors
That's just the one I use most often because Eclipse (my IDE) doesn't format anything with ES6 arrow functions, but they exist for other languages.
The Canvas Admin may be hesitant to do this as it would get loaded for every student throughout Canvas for the use of just a few and that's an overhead they may not want to do. If your computer science classes were all in a sub-account, it could be added at the sub-account level and not affect as many people.
One thing to watch out for when you do that is whether it works with the mobile apps. I don't have extensive testing there, but the worst should be that it just doesn't do anything.
Are you using the legacy quizzes or the new quizzes? In legacy quizzes, you can use the Rich Content Editor by clicking on the pencil next to the response and change from a single line, text-only answer. Here's a lesson from the Canvas Instructors Guide: How do I create a Multiple Choice quiz question?
I don't use the new quizzes and the lesson in the guide mentions being able to use the Rich Content Editor for the stem and for feedback, but not for the responses themselves. 4152,780604
Retrieving data ...