Display Choices Horizontally or in Tables

By default, the choices for a multiple-choice question are displayed as a vertical list. Sometimes, you might want to arrange the choices horizontally or in a table.

You can use the $SET_EACH_POSITION variable together with answer placeholder strings <_> to specify the location of each answer choice in your question.

  1. Include an answer placeholder string <_> in Question for each choice.
    Put the answer placeholder strings <_> where the choices should be displayed.
  2. Start the first line of Answer with the following code:
    <eqn $SET_EACH_POSITION=1; ''>

Example Horizontal Multiple-Choice Question

The following table summarizes an actual question.

QID

1158695

Name

Template2 2.MC.04.

Mode

Multiple-Choice

Question

What is the sum of the first five natural numbers? <br>
<_> <_> <_>

Answer

<eqn $SET_EACH_POSITION=1; ''>15
120
18

Display to Students

Question as displayed to students

Example Tabular Multiple-Choice Question

The following table summarizes an actual question.

Note Always specify alternative text when adding images to your questions.

QID

1247290

Name

Template2 2.MC.05.

Mode

Multiple-Choice

Question

Identify the wood duck. 
<p class="right">(Public domain images from 
http://photogallery.nrcs.usda.gov)</p>
<div class="indent">
<table>
<tr valign="top"><td><_></td><td><_></td></tr>
<tr valign="top"><td><_></td><td><_></td></tr>
</table>
</div>

Answer

<eqn $SET_EACH_POSITION=1; ''><userimage(103859, align => 'top')>
<userimage(103853, align => 'top')>
<userimage(103855, align => 'top')>
<userimage(103857, align => 'top')>

Display to Students

Question as displayed to students