Accordion HTML Not Working in Instructions in New Quizzes

Jump to solution
nogueim
Community Explorer

I am trying to use HTML to contract/expand sections for instructions in the New Quizzes. Although I am using the exact code that I use on any Canvas page, it appears that this does not work in New Quizzes. Am I doing something wrong? Here is the code I am using:

<p>For the sections below, click on the blue title to expand the selection. Click again on the blue title to close the selection.</p>

<details>

<summary><span style="font-size: 18pt;"><strong> <span style="color: #236fa1;">Title of Section to Display</span> </strong></span></summary>

 <p>Your content goes here.</p>

</details>

<hr />

 

Thank you in advance for your help.

1 Solution
Shar
Community Champion

Hi @nogueim , @chriscas , @mzimmerman , @GideonWilliams  ( I tagged everyone so you'd be informed for my reply),

I just tested out the Details tag and it is working. You have to be in Student View to see it operating because in Teacher/Build view clicking on the section takes you into Edit mode. So that's the good news.😎 Details is a standard HTML5 tag and it would be truly bad form if New Quizzes didn't recognize standard elements. Styling on the tags... are another story.

I only started using New Quizzes Fall 2023 and quickly noticed that it does apply standard Canvas CSS at all. Even the normal <P> which usually has a margin space around it is reset by some other class to margin:0px; Inspect the page and take a look. I have to manually add style="margin-bottom: 1em;" to my <P> tags otherwise my multi-paragraph instructions get squished together.

I came to this thread hoping there was a fix on how to import my CSS into New Quizzes, but alas because it is an LTI it's not even pinging regular Canvas account CSS. New Quizzes does not even grab my theme colors. 😓

Now I'm trying to decide if the ability to let students build off previous attempts (only answer questions they got wrong) is worth the sacrifice of losing all HTML styles and having to recreate the manually. 😼

Details works, CSS doesn't
Cheers - Shar

View solution in original post