Add Expandable Sections to Multi-Part Questions

Because multi-part and multi-mode questions can be long, you can use the <accordion> and <part> tags to subdivide your question into sections that your students can individually expand or collapse. This lets your students work through the question in whatever order they choose. Each expandable section can include one or more question parts or instructional content.

Note To make your students work through a question in order from beginning to end, use the <tutorial> tag to create a tutorial question.
Important Do not use the <accordion> and <tutorial> tags in the same question. The one exception to this rule is that in a question that uses the <accordion> tag, you can create a popup tutorial.
  1. If needed, open your question in the Question Editor.
    If Do this
    You know the question ID or name
    1. In the search box at the top of the page, select Question.
    2. Type the question name or ID and press Enter.
    You own the question
    1. Click Questions > My Questions.
    2. Click the question name.
    You organize your questions in folders
    1. Click Assignments > Folders and navigate to the folder with the question.
    2. Click the question name.
    You want to use advanced search
    1. Click Questions > Search Questions.
    2. Enter the search criteria you want to use.

      To view only your questions, click me next to Author.

    3. Click Search.
    4. If you own the question, click Edit next to your question.

      If you do not own the question, click View, then click Open in Editor under Previewer Tools.

  2. In Question, add <accordion> and <part> tags as needed.

    Enclose a set of expandable sections with the <accordion> tag. You must use the closing </accordion> tag at the end of the expandable sections.

    Enclose each expandable section with the <part> tag. You must use the closing </part> tag at the end of each section.

    Note The <part> and <SECTION> tags are not interchangeable. You must specify the <SECTION> tag wherever the question mode changes.

    For example:

    <accordion>
    <part>My first part: <_></part>
    <part><SECTION>My second part: <_></part>
    </accordion>
  3. Optionally, add <part_label> or <part_title> tags for each section.
    By default, the title bar for the first expandable section displays the part label Part 1, and subsequent parts are numbered consecutively. You can use the <part_label> tag to change the part label for any part, or the <part_title> tag to add text that follows the part label.
    For example, the following code displays A - Introductory Material in the section title bar:
    <part><part_label>A</part_label>
    <part_title>Introductory Material</part_title>
  4. Click Test/Preview to test the appearance and behavior of the question. See Test Questions.
  5. When your question displays and functions correctly, click Save.

Example Accordion Question

The following table summarizes an actual question.

QID

1589515

Name

Template2 3.ACC.01.

Mode

Multi-Mode...CCCCE

Question

<b>Battle of Guilford Courthouse</b>
<accordion><part><part_label>Part I</part_label><part_title>Multiple-
Choice</part_title>
When did this battle take place? <_><br>
<SECTION>Where did this battle take place? <_><br>
<SECTION>Who were the commanders? Americans:<_> <SECTION NOBR>British:<_><br>
</part>
<part><part_label>Part II</part_label><part_title>Short-Answer</part_title>
<SECTION>What was the outcome of this battle, and why was it a turning point in the 
Revolutionary War? <_><br>
</part></accordion>

Answer

<EQN $PULLDOWN=1; ''>March 15, 1781
July 4, 1776
April 19, 1775
October 9, 1781
June 16, 1775
<SECTION><EQN $PULLDOWN=1; ''>Greensboro, NC
Yorktown, VA
Charlestown, MA
Manhattan, NY
Cowpens, SC
<SECTION><EQN $PULLDOWN=1; ''>Nathanael Greene
George Washington
Dr. Joseph Warren
Israel Putnam
William Prescott
<SECTION><EQN $PULLDOWN=1; ''>Lord Cornwallis
Sir William Howe
Sir Henry Clinton
Banastre Tarleton
General John Burgoyne
<SECTION>Although Cornwallis technically won the battle, his forces were severely 
weakened, leading to his eventual surrender to Washington at Yorktown.

Display

Question as displayed to students