Note
EdX offers full support for this problem type.
The checkbox problem type is a core problem type that can be added to any course. At a minimum, checkbox problems include a question or prompt and several answer options. By adding hints, feedback, or both, you can give learners guidance and help when they work on a problem.
For more information about the core problem types, see Working with Problem Components.
In checkbox problems, learners select one or more options from a list of possible answers. To answer the problem correctly, a learner must select all of the options that are correct answers, and none of the options that are incorrect. The course team must set up each checkbox problem to have at least one correct answer.
As a best practice, be sure that all of the answer choices are unambiguous, and avoid trick questions. Checkbox problems with ambiguity can be frustrating to learners, especially if the problems have a limited number of attempts.
In the LMS, learners complete a checkbox problem by selecting the answer options that they believe are correct as well as leaving unselected the answer options that they believe are incorrect. An example of a completed checkbox problem follows.
This problem was incorrectly answered because the learner selected only two of the three required answer options. This example also shows that the learner selected Show Answer to reveal the correct answer and an explanation.
To add the example problem illustrated above, in Studio you use the simple editor to enter the following text and Markdown formatting.
>>Learning about the benefits of preventative health care can be particularly difficult.||Check all of the options below that might be reasons why.<<
[x] A large amount of time passes between undertaking a preventative measure
and seeing the result.
[ ] Non-immunized people will always fall sick.
[x] If others are immunized, fewer people will fall sick regardless of a
particular individual's choice to get immunized or not.
[x] Trust in health care professionals and government officials is fragile.
[explanation]
People who are not immunized against a disease might still not fall sick
from the disease. If someone is trying to learn whether or not preventative
measures against the disease have any impact, he or she might see these
people and conclude, since they have remained healthy despite not being
immunized, that immunizations have no effect. Consequently, he or she would
tend to believe that immunization (or other preventative measures) have
fewer benefits than they actually do.
[explanation]
The OLX (open learning XML) markup for this example checkbox problem follows.
<problem>
<choiceresponse>
<label>Learning about the benefits of preventative health care can be
particularly difficult.</label>
<description>Check all of the options below that might be reasons why.</description>
<checkboxgroup>
<choice correct="true">A large amount of time passes between
undertaking a preventative measure and seeing the result.</choice>
<choice correct="false">Non-immunized people will always fall sick.</choice>
<choice correct="true">If others are immunized, fewer people will fall
sick regardless of a particular individual's choice to get immunized
or not.</choice>
<choice correct="true">Trust in health care professionals and
government officials is fragile.</choice>
</checkboxgroup>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>People who are not immunized against a disease might still not
fall sick from the disease. If someone is trying to learn whether
or not preventative measures against the disease have any impact,
he or she might see these people and conclude, since they have
remained healthy despite not being immunized, that immunizations
have no effect. Consequently, he or she would tend to believe that
immunization (or other preventative measures) have fewer benefits
than they actually do.</p>
</div>
</solution>
</choiceresponse>
</problem>
For the checkbox problems in your course, you can use edX Insights to review aggregated learner performance data and examine submitted answers. For more information, see Using edX Insights.
You add checkbox problems in Studio by selecting the Problem component type and then using either the simple editor or the advanced editor to specify the prompt and the answer options.
Note
You can begin work on the problem in the simple editor, and then switch to the advanced editor. However, after you save any changes you make in the advanced editor, you cannot switch back to the simple editor.
When you add a checkbox problem, you can choose one of these templates.
These templates include the Markdown formatting that you use in the simple editor to add a problem without, or with, hints and feedback.
To use the simple editor to add a problem, follow these steps.
In the unit where you want to create the problem, under Add New Component select Problem.
From the list of Common Problem Types, select the type of problem you want to add. Studio adds a template for the problem to the unit.
Select Edit. The simple editor opens to a template that shows the Markdown formatting that you use for this problem type.
Replace the guidance provided by the template to add your own text for the question or prompt, answer options, explanation, and so on.
To format equations, you can use MathJax. For more information, see Using MathJax for Mathematics.
Select Settings to provide an identifying Display Name and define settings for the problem. For more information, see Defining Settings for Problem Components.
Select Save.
You can use the advanced editor to identify the elements of a checkbox problem with OLX. For more information, see Checkbox Problem OLX Reference.
To use the advanced editor to add a problem, follow these steps.
Follow steps 1-3 for creating the problem in the simple editor.
Select Advanced Editor. The advanced editor opens the template and shows the OLX markup that you can use for this problem type.
Replace the guidance provided by the template to add your own text. For example, replace the question or prompt, answer options, and explanation.
To format equations, you can use MathJax. For more information, see Using MathJax for Mathematics.
Update the OLX to add optional elements and attributes required for your problem.
Select Settings to provide an identifying Display Name and define settings for the problem. For more information, see Defining Settings for Problem Components.
Select Save.
For an overview of feedback in problems, see Adding Feedback and Hints to a Problem. For checkbox problems, you can add feedback for each of the answer options you provide in the problem. You can also identify different combinations of answer options that learners are likely to select, and add compound feedback for those combinations.
You can add feedback to a checkbox problem using the simple editor or the advanced editor.
In checkbox problems, you can provide feedback for each option that a learner can select, with distinct feedback depending on whether or not the learner selects that option. This means that there are several possible types of feedback.
You can configure the checkbox problem to provide compound feedback. Compound feedback is feedback given for a specific combination of options. For example, if you have three possible option in the problem, you can define specific feedback for when a learner selects each combination of possible options.
For problems with more than three options, providing specific feedback for each combination can become difficult. For such problems, you might choose to define compound feedback for more likely combinations of option or for combinations of option that reflect common learner misunderstandings. If you do not define feedback for a combination that a learner selects, the learner receives feedback for the individual selections.
You can configure individual option or compound feedback in the simple editor. When you create a new checkbox problem, select the template Checkboxes with Hints and Feedback. This template has example formatted feedback that you can replace with your own text.
In the simple editor, you configure individual option feedback with the following Markdown formatting.
[x] answer {{ selected: Feedback when learner selects this option. },
{unselected: Feedback when the learner does not select this option.}}
Note
You can use S
for selected
and U
for unselected.
For example, the following problem has feedback for every answer option, whether learners select a given option or leave it unselected.
>>Which of the following is an example of a fruit?||Select all that apply.<<
[x] apple {{ selected: You are correct that an apple is a fruit because it
is the fertilized ovary that comes from an apple tree and contains seeds. },
{ unselected: Remember that an apple is also a fruit.}}
[x] pumpkin {{ selected: You are correct that a pumpkin is a fruit because it
is the fertilized ovary of a squash plant and contains seeds.}, { unselected:
Remember that a pumpkin is also a fruit.}}
[ ] potato {{ U: You are correct that a potato is a vegetable because it is
an edible part of a plant in tuber form.}, { S: A potato is a vegetable, not
a fruit, because it does not come from the flower on a plant or tree and does
not contain seeds.}}
[x] tomato {{ S: You are correct that a tomato is a fruit because it is the
fertilized ovary of a tomato plant and contains seeds. }, { U: Many people
mistakenly think a tomato is a vegetable. However, because a tomato is the
fertilized ovary of a tomato plant and contains seeds it is classified as a
fruit.}}
In the simple editor, you configure compound feedback after the possible options, with the following syntax.
{{ ((Answer Combination)) Feedback when learner selects this combination of
options.}}
For example, the following compound feedback is used when learners select options A, B, and D or A, B, C, and D.
{{ ((A B D)) An apple, pumpkin, and tomato are all fruits as they are all the
fertilized ovaries of a plant and contain seeds. }}
{{ ((A B C D)) You are correct that an apple, pumpkin, and tomato are all
fruits as they are all the fertilized ovaries of a plant and contain seeds.
However, a potato is not a fruit as it is an edible part of a plant in tuber
form and is classified as a vegetable. }}
Note
If you configure individual option feedback for every answer, and you also provide compound feedback, when learners select the exact combination of answer choices defined, they only see the compound feedback. In this example, learners who select apple (A), pumpkin (B), and tomato (D) see the message “An apple, pumpkin, and tomato are all fruits as they are all the fertilized ovaries of a plant and contain seeds.” They do not also see the individual feedback for selecting A, B, and D, and for leaving C unselected.
You can configure individual option and compound feedback in the advanced editor.
In the advanced editor, you configure individual option feedback with the following syntax.
<choice correct="true">Choice label
<choicehint selected="true">Feedback for when learner selects this
answer.</choicehint>
<choicehint selected="false">Feedback for when learner does not select
this answer.</choicehint>
</choice>
For example, the following problem has feedback for each option, selected or unselected.
<problem>
<choiceresponse>
<label>Which of the following is an example of a fruit?</label>
<description>Select all that apply.</description>
<checkboxgroup>
<choice correct="true">apple
<choicehint selected="true">You are correct that an apple is a fruit
because it is the fertilized ovary that comes from an apple tree and
contains seeds.</choicehint>
<choicehint selected="false">Remember that an apple is also a
fruit.</choicehint>
</choice>
<choice correct="true">pumpkin
<choicehint selected="true">You are correct that a pumpkin is a fruit
because it is the fertilized ovary of a squash plant and contains
seeds.</choicehint>
<choicehint selected="false">Remember that a pumpkin is also a
fruit. </choicehint>
</choice>
<choice correct="false">potato
<choicehint selected="true">A potato is a vegetable, not a fruit,
because it does not come from the flower on a plant or tree and does
not contain seeds.</choicehint>
<choicehint selected="false">You are correct that a potato is
classified as a vegetable because it is an edible part of a plant in
tuber form.</choicehint>
</choice>
<choice correct="true">tomato
<choicehint selected="true">You are correct that a tomato is
classified as a fruit because it is the fertilized ovary of a tomato
plant and contains seeds.</choicehint>
<choicehint selected="false">Many people mistakenly think a tomato is
a vegetable. However, because a tomato is the fertilized ovary of a
tomato plant and contains seeds it is classified as a fruit.</choicehint>
</choice>
</checkboxgroup>
</choiceresponse>
</problem>
In the advanced editor, you define compound feedback by adding a
<compoundhint>
element within the <checkboxgroup>
element.
.
.
.
</choice>
<compoundhint value="Answer Combination">Feedback when learner selects
this combination of answers.</compoundhint>
</checkboxgroup>
For example, the following compound feedback is used when learners select options A, B, and D or A, B, C, and D.
.
.
.
</choice>
<compoundhint value="A B D">An apple, pumpkin, and tomato are all
fruits as they all are fertilized ovaries of a plant and contain
seeds.</compoundhint>
<compoundhint value="A B C D">You are correct that an apple, pumpkin,
and tomato are all fruits as they all are fertilized ovaries of a
plant and contain seeds. However, a potato is not a fruit as it is an
edible part of a plant in tuber form and is classified as a vegetable.
</compoundhint>
</checkboxgroup>
You can add hints to a checkbox problem using the simple editor or the advanced editor. For an overview of hints in problems, see Adding Feedback and Hints to a Problem.
In the simple editor, you configure hints with the following syntax.
||Hint 1||
||Hint 2||
||Hint n||
Note
You can configure any number of hints. The learner views one hint at a time and views the next one by selecting Hint again.
For example, the following problem has two hints.
||A fruit is the fertilized ovary from a flower.||
||A fruit contains seeds of the plant.||
In the advanced editor, you add the <demandhint>
element immediately before
the closing </problem>
tag, and then configure each hint using the
<hint>
element.
.
.
.
<demandhint>
<hint>Hint 1</hint>
<hint>Hint 2</hint>
<hint>Hint 3</hint>
</demandhint>
</problem>
For example, the following OLX for a multiple choice problem shows two hints.
.
.
.
</multiplechoiceresponse>
<demandhint>
<hint>A fruit is the fertilized ovary from a flower.</hint>
<hint>A fruit contains seeds of the plant.</hint>
</demandhint>
</problem>
You can configure a checkbox problem to award partial credit to learners who submit an answer that is partly correct. You must use the advanced editor to configure partial credit.
For an overview of partial credit in problems, see Awarding Partial Credit for a Problem.
In the following example, the learner selected two of the three correct choices, and did not select any incorrect choices. The learner therefore had four out of five correct answers. Because the course team set this problem up to award partial credit for every correct answer selected and every incorrect answer left unselected (known as every decision counts), the learner earned 80% of the points for this problem.
You can use the following methods to award partial credit in a checkbox problem.
You can configure a checkbox problem so that every selection a learner makes for the checkbox problem is evaluated and scored. This method is known as every decision counts (EDC).
With EDC, if “n” is the number of possible options, learners earn 1/n of the total possible score for each correct option they select. Learners receive partial credit for every correct answer selected and every incorrect answer left unselected.
For example, if there are four options, every option that a learner matches is worth 25% of the total score. A learner also gains 25% for each incorrect answer that a learner does NOT select.
The following table shows how the different combinations of learner selections would score for one EDC problem whose answers are as follows.
Learner’s Selections | Score | Explanation |
---|---|---|
A, B, D | 100% | The learner matched each of the 3 correct answers for 75%, and also gained 25% for not selecting the incorrect answer. |
A, B | 75% | The learner matched 2 of the correct answers for 50%, and also gained 25% for not selecting the incorrect answer. |
A, B, C | 50% | The learner matched 2 of the correct answers for 50%, but selected the incorrect answer. |
A, C | 25% | The learner matched 1 of the correct answers for 25%, but selected the incorrect answer. |
To configure an EDC checkbox problem, you add the partial_credit="EDC"
attribute to the <choiceresponse>
element in the problem OLX.
For example, the following OLX shows the checkbox problem template after it is updated to provide partial credit.
<problem>
<choiceresponse partial_credit="EDC">
<label>Which of the following is a fruit?</label>
<description>Select all that apply.</description>
<checkboxgroup>
<choice correct="true">apple</choice>
<choice correct="true">pumpkin</choice>
<choice correct="false">potato</choice>
<choice correct="true">tomato</choice>
</checkboxgroup>
</choiceresponse>
</problem>
You can configure a checkbox problem so that for every option that a learner gets wrong, either by not selecting a correct option or by selecting an incorrect option, half of the remaining points are deducted from the learner’s score. This method is known as scoring by halves.
Note
By design, partial credit by halves requires the number of answer options to be more than twice the number of incorrect answers. In addition, partial credit is not given for more than two wrong answers, regardless of the total number of answer options. In other words, two wrong answers is scored at 25% only if there are at least 5 answer options. Three or more wrong answers is always scored at 0%, regardless of the number of total answer options.
Partial credit using the by halves method is calculated as follows.
The following tables illustrate partial credit score using the halves method, for problems with an increasing number of total answer options.
Number of Incorrect Answers | Number of Answer Options | Credit Given (%) |
---|---|---|
0 | 2 | 100 |
1 | 2 | 0 |
2 | 2 | 0 |
Number of Incorrect Answers | Number of Answer Options | Credit Given (%) |
---|---|---|
0 | 3 | 100 |
1 | 3 | 0 |
2 | 3 | 0 |
3 | 3 | 0 |
Number of Incorrect Answers | Number of Answer Options | Credit Given (%) |
---|---|---|
0 | 4 | 100 |
1 | 4 | 50 |
2 | 4 | 0 |
3 | 4 | 0 |
4 | 4 | 0 |
Number of Incorrect Answers | Number of Answer Options | Credit Given (%) |
---|---|---|
0 | 5 | 100 |
1 | 5 | 50 |
2 | 5 | 25 |
3 | 5 | 0 |
4 | 5 | 0 |
5 | 5 | 0 |
Number of Incorrect Answers | Number of Answer Options | Credit Given (%) |
---|---|---|
0 | 7 | 100 |
1 | 7 | 50 |
2 | 7 | 25 |
3 | 7 | 0 |
4 | 7 | 0 |
5 | 7 | 0 |
To configure a by halves checkbox problem, you add the
partial_credit="halves"
attribute to the <choiceresponse>
element in
the problem OLX.
The following example shows a checkbox problem that provides partial credit by halves.
<problem>
<choiceresponse partial_credit="halves">
<label>Which of the following is a fruit?</label>
<description>Select all that apply.</description>
<checkboxgroup>
<choice correct="true">apple</choice>
<choice correct="true">pumpkin</choice>
<choice correct="false">potato</choice>
<choice correct="true">tomato</choice>
</checkboxgroup>
</choiceresponse>
</problem>
Note
You can also set attributes and options by adding a <script>
element.
For more information, see Using the Script Element.
<problem>
<choiceresponse>
<label>Question or prompt text</label>
<description>Information about how to answer the question</description>
<checkboxgroup>
<choice correct="false">Answer option A (incorrect)</choice>
<choice correct="true">Answer option B (correct)</choice>
<choice correct="true">Answer option C (correct)</choice>
</checkboxgroup>
<solution>
<div class="detailed-solution">
<p>Optional header for the explanation or solution</p>
<p>Optional explanation or solution text</p>
</div>
</solution>
</choiceresponse>
<demandhint>
<hint>Hint 1</hint>
<hint>Hint 2</hint>
</demandhint>
</problem>
For checkbox problems, the <problem>
element can include this hierarchy of
child elements.
<choiceresponse>
<label>
<description>
<checkboxgroup>
<choice>
<choicehint>
<compoundhint>
<solution>
<demandhint>
<hint>
In addition, standard HTML tags can be used to format text.
<choiceresponse>
¶Required. Indicates that the problem is a checkbox problem.
Attribute | Description |
---|---|
partial_credit |
Optional. Specifies the type of partial credit given. EDC or
halves . |
<label>
<description>
<checkboxgroup>
<solution>
<label>
¶Required. Identifies the question or prompt. You can include HTML tags within this element.
None.
None.
<description>
¶Optional. Provides clarifying information about how to answer the question. You can include HTML tags within this element.
None.
None.
<checkboxgroup>
¶Required. Indicates the beginning of the list of options.
None.
<choice>
<compoundhint>
<choice>
¶Required. Designates an answer option.
Attribute | Description |
---|---|
correct |
Indicates a correct or incorrect answer.
|
<choicehint>
<choicehint>
¶Optional. Specifies feedback for the answer.
Attribute | Description |
---|---|
selected |
Required. true or false . Indicates if the feedback is given
when the answer option is selected, or when it is not selected. |
None.
<compoundhint>
¶Optional. Specifies feedback for a specific combination of answers.
Attribute | Description |
---|---|
value (at least one required) |
Indicates the combination of selected answers that triggers this feedback. Answers are identified by uppercase letters, in ascending alphabetical order. |
None.
<solution>
¶Optional. Identifies the explanation or solution for the problem, or for one of the questions in a problem that contains more than one question.
This element contains an HTML division <div>
. The division contains one or
more paragraphs <p>
of explanatory text.
You can use the <script>
element to programmatically set attributes and
options for your checkbox problems. You could use this feature to display
different questions/answers depending on variable factors, like time of day, or
randomly generated numbers.
You must use the advanced editor to configure a
<script>
element.
The contents of the <script>
element must be enclosed in <![CDATA[
…
]]>
markers, to indicate that the enclosed code should not be interpreted
as XML.
The code in the <script>
element is run on the server before the problem is
shown to learners. Note that only Python script types are supported.
The following OLX example uses random numbers to generate different answer choices for each learner, and mathematical operators to determine each choice’s correctness.
<problem>
<script type="text/python">
<![CDATA[
random.seed(anonymous_student_id) # Use different random numbers for each student.
a = random.randint(1,10)
b = random.randint(1,10)
c = a + b
ok0 = c % 2 == 0 # check remainder modulo 2
text0 = "$a + $b is divisible by 2"
ok1 = c % 3 == 0 # check remainder modulo 3
text1 = "$a + $b is divisible by 3"
ok2 = c % 5 == 0 # check remainder modulo 5
text2 = "$a + $b is divisible by 5"
ok3 = not any([ok0, ok1, ok2])
text3 = "None of the above statements is true."
]]>
</script>
<choiceresponse>
<label>Which statements about the number $a+$b are true? Select all that apply.</label>
<checkboxgroup direction="vertical">
<choice correct="$ok0">$text0 ... (should be $ok0)</choice>
<choice correct="$ok1">$text1 ... (should be $ok1)</choice>
<choice correct="$ok2">$text2 ... (should be $ok2)</choice>
<choice correct="$ok3">$text3 ... (should be $ok3)</choice>
</checkboxgroup>
</choiceresponse>
</problem>