You can create checkbox problems in the Simple Editor or in the Advanced Editor.
You can create checkbox problems in the Simple Editor or in the Advanced Editor.
++++++++++++++++++++++++++++++++++++++++++
Simple Editor
Simple Editor
-------------
++++++++++++++++++++++++++++++++++++++++++
#. Under **Add New Component**, click **Problem**.
#. Under **Add New Component**, click **Problem**.
#. In the **Select Problem Component Type** screen, click **Checkboxes** on the **Common Problem Types** tab.
#. In the **Select Problem Component Type** screen, click **Checkboxes** on the **Common Problem Types** tab.
...
@@ -91,8 +92,9 @@ following.
...
@@ -91,8 +92,9 @@ following.
(or other preventative measures) have fewer benefits than they actually do.
(or other preventative measures) have fewer benefits than they actually do.
[explanation]
[explanation]
++++++++++++++++++++++++++++++++++++++++++
Advanced Editor
Advanced Editor
---------------
++++++++++++++++++++++++++++++++++++++++++
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
...
@@ -142,8 +144,9 @@ Create a Dropdown Problem
...
@@ -142,8 +144,9 @@ Create a Dropdown Problem
You can create dropdown problems in the Simple Editor or in the Advanced Editor.
You can create dropdown problems in the Simple Editor or in the Advanced Editor.
++++++++++++++++++++++++++++++++++++++++++
Simple Editor
Simple Editor
-------------
++++++++++++++++++++++++++++++++++++++++++
To create a dropdown problem, follow these steps.
To create a dropdown problem, follow these steps.
...
@@ -186,8 +189,9 @@ following.
...
@@ -186,8 +189,9 @@ following.
Life stage - infant, child, and adult:
Life stage - infant, child, and adult:
[[(Nominal), Discrete, Continuous]]
[[(Nominal), Discrete, Continuous]]
++++++++++++++++++++++++++++++++++++++++++
Advanced Editor
Advanced Editor
---------------
++++++++++++++++++++++++++++++++++++++++++
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
...
@@ -229,14 +233,21 @@ the question.
...
@@ -229,14 +233,21 @@ the question.
.. image:: ../Images/MultipleChoiceExample.png
.. image:: ../Images/MultipleChoiceExample.png
:alt: Image of a multiple choice problem
:alt: Image of a multiple choice problem
You can also configure the following:
* :ref:`Shuffle Answers in a Multiple Choice Problem`
* :ref:`Targeted Feedback in a Multiple Choice Problem`
* :ref:`Answer Pools in a Multiple Choice Problem`
==================================
==================================
Create a Multiple Choice Problem
Create a Multiple Choice Problem
==================================
==================================
You can create multiple choice problems in the Simple Editor or in the Advanced Editor.
You can create multiple choice problems in the Simple Editor or in the Advanced Editor.
++++++++++++++++++++++++++++++++++++++++++
Simple Editor
Simple Editor
-------------
++++++++++++++++++++++++++++++++++++++++++
#. Under **Add New Component**, click **Problem**.
#. Under **Add New Component**, click **Problem**.
#. In the **Select Problem Component Type** screen, click **Multiple
#. In the **Select Problem Component Type** screen, click **Multiple
...
@@ -290,8 +301,9 @@ following.
...
@@ -290,8 +301,9 @@ following.
investigating lateral inhibition using horseshoe crabs.
investigating lateral inhibition using horseshoe crabs.
[Explanation]
[Explanation]
++++++++++++++++++++++++++++++++++++++++++
Advanced Editor
Advanced Editor
---------------
++++++++++++++++++++++++++++++++++++++++++
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
...
@@ -316,6 +328,244 @@ To create this problem in the Advanced Editor, click the **Advanced** tab in the
...
@@ -316,6 +328,244 @@ To create this problem in the Advanced Editor, click the **Advanced** tab in the
</solution>
</solution>
</problem>
</problem>
.. _Shuffle Answers in a Multiple Choice Problem:
=============================================
Shuffle Answers in a Multiple Choice Problem
=============================================
Optionally, you can configure a multiple choice problem so that it shuffles the order of possible answers.
:alt: Image of a multiple choice problem with shuffled answers
You can also have some answers shuffled, but not others. For example, you may want to have the answer "All of the Above" fixed at the end of the list, but shuffle other answers.
You can configure the problem to shuffle answers through :ref:`Simple Editor` or :ref:`Advanced Editor`.
++++++++++++++++++++++++++++++++++++++++++
Use the Simple Editor to Shuffle Answers
++++++++++++++++++++++++++++++++++++++++++
You can configure the problem to shuffle answers in :ref:`Simple Editor`.
For example, the following text defines a multiple choice problem, before shuffling is enabled. The ``(x)`` indicates the correct answer::
>>What Apple device competed with the portable CD player?<<
( ) The iPad
( ) Napster
(x) The iPod
( ) The vegetable peeler
To add shuffling to this problem, add ``!`` in the parenthesis of the first answer::
>>What Apple device competed with the portable CD player?<<
(!) The iPad
( ) Napster
(x) The iPod
( ) The vegetable peeler
To fix an answer's location in the list, add ``@`` in the parenthesis of that answer::
>>What Apple device competed with the portable CD player?<<
(!) The iPad
( ) Napster
(x) The iPod
( ) The vegetable peeler
(@) All of the above
You can combine symbols within parenthesis as necessary. For example, to show the correct answer in a fixed location, you could use::
(x@) The iPod
++++++++++++++++++++++++++++++++++++++++++
Use the Advanced Editor to Shuffle Answers
++++++++++++++++++++++++++++++++++++++++++
You can configure the problem to shuffle answers through XML in :ref:`Advanced Editor`.
For example, the following XML defines a multiple choice problem, before shuffling is enabled:
.. code-block:: xml
<p>What Apple device competed with the portable CD player?</p>
<choice correct="false" fixed="true">All of the above</choice>
</choicegroup>
</multiplechoiceresponse>
.. _Targeted Feedback in a Multiple Choice Problem:
===============================================
Targeted Feedback in a Multiple Choice Problem
===============================================
You can configure a multiple choice problem so that explanations for incorrect answers are automatically shown to students. You can use these explanations to guide students towards the right answer. Therefore, targeted feedback is most useful for multiple choice problems for which students are allowed multiple attempts.
This is followed by XML that defines the targeted feedback:
.. code-block:: xml
<targetedfeedbackset>
<targetedfeedback explanation-id="feedback1">
<div class="detailed-targeted-feedback">
<p>Targeted Feedback</p>
<p>The iPad came out later and did not directly compete the portable CD players.</p>
</div>
</targetedfeedback>
<targetedfeedback explanation-id="feedback2">
<div class="detailed-targeted-feedback">
<p>Targeted Feedback</p>
<p>Napster was not an Apple product.</p>
</div>
</targetedfeedback>
<targetedfeedback explanation-id="feedback3">
<div class="detailed-targeted-feedback">
<p>Targeted Feedback</p>
<p>No, not even close.</p>
</div>
</targetedfeedback>
</targetedfeedbackset>
<solution explanation-id="correct">
<div class="detailed-solution">
<p>Yes, the iPod competed with portable CD players.</p>
</div>
</solution>
.. _Answer Pools in a Multiple Choice Problem:
=============================================
Answer Pools in a Multiple Choice Problem
=============================================
You can configure a multiple choice problem so that a random subset of choices are shown to each student. For example, you can add 10 possible choices to the problem, and each student views a set of five choices.
The answer pool must have at least one correct answer, and can have more than one. In each set of choices shown to a student, one correct answer is included. For example, you may configure two correct answers in the set of 10. One of the two correct answers is included in each set a student views.
You configure the problem to provide answer pools through XML in :ref:`Advanced Editor`.
Follow these XML guidelines:
* In the ``<choicegroup>`` element, add the ``answer-pool`` attribute, with the numerical value indicating the number of possible answers in the set. For example, ``<choicegroup answer-pool="4">``.
* For each correct answer, to the ``<choice>`` element, add an ``explanation-id`` attribute and value that maps to a solution. For example, ``<choice correct="true" explanation-id="iPod">The iPod</choice>``.
* For each ``<solution>`` element, add an ``explanation-id`` attribute and value that maps back to a correct answer. For example, ``<solution explanation-id="iPod">``.
.. note:: If the choices include only one correct answer, you do not have to use the ``explanation-id`` in either the ``choice`` or ``<solution>`` element. You do still use the ``<solutionset>`` element to wrap the ``<solution>`` element.
For example, for the following multiple choice problem, a student will see four choices, and in each set one of the choices will be one of the two correct ones. The explanation shown for the correct answer is the one with the same explanation ID.
.. code-block:: xml
<problem>
<p>What Apple devices let you carry your digital music library in your pocket?</p>
The following are a few more examples of the way that Studio renders numerical input
text that students enter.
.. image:: ../Images/Math1.gif
:alt: Image of a numerical input probem rendered by Studio
.. image:: ../Images/Math2.gif
:alt: Image of a numerical input probem rendered by Studio
.. image:: ../Images/Math3.gif
:alt: Image of a numerical input probem rendered by Studio
.. image:: ../Images/Math4.gif
:alt: Image of a numerical input probem rendered by Studio
.. image:: ../Images/Math5.gif
:alt: Image of a numerical input probem rendered by Studio
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
...
@@ -581,8 +852,9 @@ Create a Text Input Problem
...
@@ -581,8 +852,9 @@ Create a Text Input Problem
You can create multiple choice problems in the Simple Editor or in the Advanced Editor.
You can create multiple choice problems in the Simple Editor or in the Advanced Editor.
++++++++++++++++++++++++++++++++++++++++++
Simple Editor
Simple Editor
-------------
++++++++++++++++++++++++++++++++++++++++++
To create a text input problem in the Simple Editor, follow these steps.
To create a text input problem in the Simple Editor, follow these steps.
...
@@ -625,8 +897,9 @@ following.
...
@@ -625,8 +897,9 @@ following.
from the group (even when the group does not have 100% bednet coverage).
from the group (even when the group does not have 100% bednet coverage).
[explanation]
[explanation]
++++++++++++++++++++++++++++++++++++++++++
Advanced Editor
Advanced Editor
---------------
++++++++++++++++++++++++++++++++++++++++++
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
To create this problem in the Advanced Editor, click the **Advanced** tab in the Problem component editor, and then replace the existing code with the following code.
...
@@ -676,8 +949,9 @@ For example, instead of requiring students to enter exactly "Dr. Martin Luther
...
@@ -676,8 +949,9 @@ For example, instead of requiring students to enter exactly "Dr. Martin Luther
King, Junior," you can allow answers of "Martin Luther King," "Doctor Martin
King, Junior," you can allow answers of "Martin Luther King," "Doctor Martin
Luther King," and other variations. To do this, you can use the Simple Editor or the Advanced Editor.
Luther King," and other variations. To do this, you can use the Simple Editor or the Advanced Editor.
++++++++++++++++++++++++++++++++++++++++++
Simple Editor
Simple Editor
-------------
++++++++++++++++++++++++++++++++++++++++++
To specify additional correct responses in the Simple Editor, include "or=" (without the quotation marks) before each additional correct response.
To specify additional correct responses in the Simple Editor, include "or=" (without the quotation marks) before each additional correct response.
...
@@ -690,9 +964,9 @@ To specify additional correct responses in the Simple Editor, include "or=" (wit
...
@@ -690,9 +964,9 @@ To specify additional correct responses in the Simple Editor, include "or=" (wit
or= Martin Luther King
or= Martin Luther King
++++++++++++++++++++++++++++++++++++++++++
Advanced Editor
Advanced Editor
---------------
++++++++++++++++++++++++++++++++++++++++++
To specify additional correct responses in the Advanced Editor, add an ``<additional_answer>`` for each correct response inside the opening and closing ``<stringresponse>`` tags.
To specify additional correct responses in the Advanced Editor, add an ``<additional_answer>`` for each correct response inside the opening and closing ``<stringresponse>`` tags.
...
@@ -774,3 +1048,110 @@ You can provide hints that appear when students enter common incorrect answers i
...
@@ -774,3 +1048,110 @@ You can provide hints that appear when students enter common incorrect answers i
The regular expression that the student enters must contain the part of the answer that the instructor specifies. For example, if an instructor has specified ``<answer=".*example answer.*" type="regexp">``, correct answers include ``example answered``, ``two example answers``, or even ``==example answer==``, but not ``examples`` or ``example anser``.
The regular expression that the student enters must contain the part of the answer that the instructor specifies. For example, if an instructor has specified ``<answer=".*example answer.*" type="regexp">``, correct answers include ``example answered``, ``two example answers``, or even ``==example answer==``, but not ``examples`` or ``example anser``.
You can add ``regexp`` to the value of the ``type`` attribute, for example: ``type="ci regexp"`` or ``type="regexp"`` or ``type="regexp cs"``. In this case, any answer or hint are treated as regular expressions.
You can add ``regexp`` to the value of the ``type`` attribute, for example: ``type="ci regexp"`` or ``type="regexp"`` or ``type="regexp cs"``. In this case, any answer or hint are treated as regular expressions.
You can provide hints for common incorrect answers in text input problems. You can also set a text input problem to allow a regular expression as an answer. To do this, you'll have to modify the problem's XML in the Advanced Editor. For more information, see :ref:`Text Input`.
Although you can create text input problems by using the Simple Editor in Studio, you may want to see or change the problem's underlying XML. For example, you can add hints that appear when students enter common incorrect answers, or modify the problem's XML so that students can submit regular expressions as answers.
The regular expression that the student enters must contain the part of the answer that the instructor specifies. For example, if an instructor has specified ``<answer=".*example answer.*" type="regexp">``, correct answers include ``example answered``, ``two example answers``, or even ``==example answer==``, but not ``examples`` or ``example anser``.
You can add ``regexp`` to the value of the ``type`` attribute, for example: ``type="ci regexp"`` or ``type="regexp"`` or ``type="regexp cs"``. In this case, any answer or hint will be treated as regular expressions.
**Sample Problem**
.. image:: /Images/TextInputExample.gif
:alt: Image of a string response problem
**XML Tags**
.. list-table::
:widths: 20 80
* - ``<stringresponse>``
- Indicates that the problem is a text input problem.
* - ``<textline>``
- Child of ``<stringresponse>``. Lists the answer options and contains the ``label`` attribute.
* - ``<additional_answer>`` (optional)
- Specifies an additional correct answer for the problem. A problem can contain an unlimited number of additional answers.
* - ``<hintgroup>`` (optional)
- Indicates that the instructor has provided hints for certain common incorrect answers.
* - ``<stringhint />`` (optional)
- Child of ``<hintgroup>``. Specifies the text of the incorrect answer to provide the hint for. Contains answer, type, name.
* - ``<hintpart>``
- Contains the name from ``<stringhint>``. Associates the incorrect answer with the hint text for that incorrect answer.
* - ``<startouttext />``
- Indicates the beginning of the text of the hint.
* - ``<endouttext />``
- Indicates the end of the text of the hint.
**Sample Problem Code**
.. code-block:: xml
<problem>
<p>
<em>This problem is adapted from an exercise that first appeared in MITx's 14.73x The Challenges of Global Poverty course, spring 2013.</em>
</p>
<p>What is the technical term that refers to the fact that, when enough people sleep under a bednet, the disease may altogether disappear?</p>
<textline size="20" label="What is the technical term that refers to the fact that, when enough people sleep under a bednet, the disease may altogether disappear?"/>
In contact immunity, a vaccinated individual passes along his immunity to another person through contact with feces or bodily fluids. The answer to the question above refers to the form of immunity that occurs when so many members of a population are protected, an infectious disease is unlikely to spread to the unprotected population.
Although a firewall provides protection for a population, the term "firewall" is used more in computing and technology than in epidemiology.
<endouttext />
</hintpart >
</hintgroup>
</stringresponse>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>The correct answer is <b>herd immunity</b>. As more and more people use bednets, the risk of malaria begins to fall for everyone – users and non-users alike. This can fall to such a low probability that malaria is effectively eradicated from the group (even when the group does not have 100% bednet coverage).</p>
<startouttext />Text of hint for incorrect answer C<endouttext />
</hintpart >
</hintgroup>
</stringresponse>
<solution>
<div class="detailed-solution">
<p>Explanation or Solution Header</p>
<p>Explanation or solution text</p>
</div>
</solution>
</problem>
You can provide hints for common incorrect answers in text input problems. You can also set a text input problem to allow a regular expression as an answer. To do this, you'll have to modify the problem's XML in the Advanced Editor. For more information, see :ref:`Text Input`.