Commit cb217563 by Christina Roberts

Merge pull request #9063 from edx/christina/tnl-231

Delete mention of direction from checkboxgroup.
parents 454a0ada 85b8a881
...@@ -860,7 +860,7 @@ class ChoiceResponse(LoncapaResponse): ...@@ -860,7 +860,7 @@ class ChoiceResponse(LoncapaResponse):
The hint information goes into the msg= in new_cmap for display. The hint information goes into the msg= in new_cmap for display.
Each choice in the checkboxgroup can have 2 extended hints, matching the Each choice in the checkboxgroup can have 2 extended hints, matching the
case that the student has or has not selected that choice: case that the student has or has not selected that choice:
<checkboxgroup label="Select the best snack" direction="vertical"> <checkboxgroup label="Select the best snack">
<choice correct="true">Donut <choice correct="true">Donut
<choicehint selected="tRuE">A Hint!</choicehint> <choicehint selected="tRuE">A Hint!</choicehint>
<choicehint selected="false">Another hint!</choicehint> <choicehint selected="false">Another hint!</choicehint>
...@@ -986,7 +986,7 @@ class MultipleChoiceResponse(LoncapaResponse): ...@@ -986,7 +986,7 @@ class MultipleChoiceResponse(LoncapaResponse):
to translate back to choice_0 name style for recording in the logs, so to translate back to choice_0 name style for recording in the logs, so
the logging is in terms of the regular names. the logging is in terms of the regular names.
""" """
# TODO: handle direction and randomize # TODO: randomize
human_name = _('Multiple Choice') human_name = _('Multiple Choice')
tags = ['multiplechoiceresponse'] tags = ['multiplechoiceresponse']
...@@ -1338,7 +1338,7 @@ class TrueFalseResponse(MultipleChoiceResponse): ...@@ -1338,7 +1338,7 @@ class TrueFalseResponse(MultipleChoiceResponse):
@registry.register @registry.register
class OptionResponse(LoncapaResponse): class OptionResponse(LoncapaResponse):
""" """
TODO: handle direction and randomize TODO: handle randomize
""" """
human_name = _('Dropdown') human_name = _('Dropdown')
......
<problem> <problem>
<p>Select all the fruits from the list. In retrospect, the wordiness of these tests increases the dizziness!</p> <p>Select all the fruits from the list. In retrospect, the wordiness of these tests increases the dizziness!</p>
<choiceresponse> <choiceresponse>
<checkboxgroup label="Select all the fruits from the list" direction="vertical"> <checkboxgroup label="Select all the fruits from the list">
<choice correct="true" id="alpha">Apple <choice correct="true" id="alpha">Apple
<choicehint selected="TrUe">You are right that apple is a fruit. <choicehint selected="TrUe">You are right that apple is a fruit.
</choicehint> </choicehint>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</choiceresponse> </choiceresponse>
<p>Select all the vegetables from the list</p> <p>Select all the vegetables from the list</p>
<choiceresponse> <choiceresponse>
<checkboxgroup label="Select all the vegetables from the list" direction="vertical"> <checkboxgroup label="Select all the vegetables from the list">
<choice correct="false">Banana <choice correct="false">Banana
<choicehint selected="true">No, sorry, a banana is a fruit. <choicehint selected="true">No, sorry, a banana is a fruit.
</choicehint> </choicehint>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</choiceresponse> </choiceresponse>
<p>Compoundhint vs. correctness</p> <p>Compoundhint vs. correctness</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">A</choice> <choice correct="true">A</choice>
<choice correct="false">B</choice> <choice correct="false">B</choice>
<choice correct="true">C</choice> <choice correct="true">C</choice>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</choiceresponse> </choiceresponse>
<p>If one label matches we use it, otherwise go with the default, and whitespace scattered around.</p> <p>If one label matches we use it, otherwise go with the default, and whitespace scattered around.</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true"> <choice correct="true">
A A
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<p>Blank labels</p> <p>Blank labels</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">A <choicehint selected="true" label="">aa</choicehint></choice> <choice correct="true">A <choicehint selected="true" label="">aa</choicehint></choice>
<choice correct="true">B <choicehint selected="true">bb</choicehint></choice> <choice correct="true">B <choicehint selected="true">bb</choicehint></choice>
<compoundhint value="A B" label="">compoundo</compoundhint> <compoundhint value="A B" label="">compoundo</compoundhint>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<p>Case where the student selects nothing, but there's feedback</p> <p>Case where the student selects nothing, but there's feedback</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">A <choicehint selected="true">aa</choicehint></choice> <choice correct="true">A <choicehint selected="true">aa</choicehint></choice>
<choice correct="false">B <choicehint selected="false">bb</choicehint></choice> <choice correct="false">B <choicehint selected="false">bb</choicehint></choice>
</checkboxgroup> </checkboxgroup>
......
<problem> <problem>
<choiceresponse> <choiceresponse>
<checkboxgroup label="Select all the vegetables from the list" direction="vertical"> <checkboxgroup label="Select all the vegetables from the list">
<choice correct="false">Banana <choice correct="false">Banana
<choicehint selected="true">No, sorry, a banana is a fruit. <choicehint selected="true">No, sorry, a banana is a fruit.
</choicehint> </choicehint>
......
...@@ -338,7 +338,7 @@ class CheckboxHintsTestTracking(HintTest): ...@@ -338,7 +338,7 @@ class CheckboxHintsTestTracking(HintTest):
<problem> <problem>
<p>question</p> <p>question</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">Apple <choice correct="true">Apple
<choicehint selected="true">A true</choicehint> <choicehint selected="true">A true</choicehint>
<choicehint selected="false">A false</choicehint> <choicehint selected="false">A false</choicehint>
......
...@@ -724,7 +724,7 @@ describe 'MarkdownEditingDescriptor', -> ...@@ -724,7 +724,7 @@ describe 'MarkdownEditingDescriptor', ->
<p>Choice checks</p> <p>Choice checks</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="false">option1 [x]</choice> <choice correct="false">option1 [x]</choice>
<choice correct="true">correct</choice> <choice correct="true">correct</choice>
<choice correct="true">redundant</choice> <choice correct="true">redundant</choice>
......
...@@ -188,7 +188,7 @@ describe 'Markdown to xml extended hint checkbox', -> ...@@ -188,7 +188,7 @@ describe 'Markdown to xml extended hint checkbox', ->
<problem> <problem>
<p>Select all the fruits from the list</p> <p>Select all the fruits from the list</p>
<choiceresponse> <choiceresponse>
<checkboxgroup label="Select all the fruits from the list" direction="vertical"> <checkboxgroup label="Select all the fruits from the list">
<choice correct="true">Apple <choice correct="true">Apple
<choicehint selected="true">You're right that apple is a fruit.</choicehint> <choicehint selected="true">You're right that apple is a fruit.</choicehint>
<choicehint selected="false">Remember that apple is also a fruit.</choicehint></choice> <choicehint selected="false">Remember that apple is also a fruit.</choicehint></choice>
...@@ -209,7 +209,7 @@ describe 'Markdown to xml extended hint checkbox', -> ...@@ -209,7 +209,7 @@ describe 'Markdown to xml extended hint checkbox', ->
<p>Select all the vegetables from the list</p> <p>Select all the vegetables from the list</p>
<choiceresponse> <choiceresponse>
<checkboxgroup label="Select all the vegetables from the list" direction="vertical"> <checkboxgroup label="Select all the vegetables from the list">
<choice correct="false">Banana <choice correct="false">Banana
<choicehint selected="true">No, sorry, a banana is a fruit.</choicehint> <choicehint selected="true">No, sorry, a banana is a fruit.</choicehint>
<choicehint selected="false">poor banana.</choicehint></choice> <choicehint selected="false">poor banana.</choicehint></choice>
...@@ -266,7 +266,7 @@ describe 'Markdown to xml extended hint checkbox', -> ...@@ -266,7 +266,7 @@ describe 'Markdown to xml extended hint checkbox', ->
<problem> <problem>
<p>Select all the fruits from the list</p> <p>Select all the fruits from the list</p>
<choiceresponse> <choiceresponse>
<checkboxgroup label="Select all the fruits from the list" direction="vertical"> <checkboxgroup label="Select all the fruits from the list">
<choice correct="true">Apple <choice correct="true">Apple
<choicehint selected="true">You're right that apple is a fruit.</choicehint> <choicehint selected="true">You're right that apple is a fruit.</choicehint>
<choicehint selected="false">Remember that apple is also a fruit.</choicehint></choice> <choicehint selected="false">Remember that apple is also a fruit.</choicehint></choice>
...@@ -287,7 +287,7 @@ describe 'Markdown to xml extended hint checkbox', -> ...@@ -287,7 +287,7 @@ describe 'Markdown to xml extended hint checkbox', ->
<p>Select all the vegetables from the list</p> <p>Select all the vegetables from the list</p>
<choiceresponse> <choiceresponse>
<checkboxgroup label="Select all the vegetables from the list" direction="vertical"> <checkboxgroup label="Select all the vegetables from the list">
<choice correct="false">Banana <choice correct="false">Banana
<choicehint selected="true">No, sorry, a banana is a fruit.</choicehint> <choicehint selected="true">No, sorry, a banana is a fruit.</choicehint>
<choicehint selected="false">poor banana.</choicehint></choice> <choicehint selected="false">poor banana.</choicehint></choice>
...@@ -753,7 +753,7 @@ describe 'Markdown to xml extended hint with multiline hints', -> ...@@ -753,7 +753,7 @@ describe 'Markdown to xml extended hint with multiline hints', ->
<problem> <problem>
<p>Checkboxes</p> <p>Checkboxes</p>
<choiceresponse> <choiceresponse>
<checkboxgroup label="Checkboxes" direction="vertical"> <checkboxgroup label="Checkboxes">
<choice correct="true">A <choice correct="true">A
<choicehint selected="true">aaa</choicehint> <choicehint selected="true">aaa</choicehint>
<choicehint selected="false">bbb</choicehint></choice> <choicehint selected="false">bbb</choicehint></choice>
...@@ -891,7 +891,7 @@ describe 'Markdown to xml extended hint with tricky syntax cases', -> ...@@ -891,7 +891,7 @@ describe 'Markdown to xml extended hint with tricky syntax cases', ->
<p>q1</p> <p>q1</p>
<p>this [x]</p> <p>this [x]</p>
<choiceresponse> <choiceresponse>
<checkboxgroup label="q1" direction="vertical"> <checkboxgroup label="q1">
<choice correct="false">a [square]</choice> <choice correct="false">a [square]</choice>
<choice correct="true">b {{ this hint passes through }}</choice> <choice correct="true">b {{ this hint passes through }}</choice>
</checkboxgroup> </checkboxgroup>
......
...@@ -353,7 +353,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -353,7 +353,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
var groupString = '<choiceresponse>\n', var groupString = '<choiceresponse>\n',
options, value, correct; options, value, correct;
groupString += ' <checkboxgroup direction="vertical">\n'; groupString += ' <checkboxgroup>\n';
options = match.split('\n'); options = match.split('\n');
endHints = ''; // save these up to emit at the end endHints = ''; // save these up to emit at the end
......
...@@ -29,7 +29,7 @@ data: | ...@@ -29,7 +29,7 @@ data: |
<p>You can use the following example problem as a model.</p> <p>You can use the following example problem as a model.</p>
<p>The following languages are in the Indo-European family:</p> <p>The following languages are in the Indo-European family:</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true" name="urdu">Urdu</choice> <choice correct="true" name="urdu">Urdu</choice>
<choice correct="false" name="finnish">Finnish</choice> <choice correct="false" name="finnish">Finnish</choice>
<choice correct="true" name="marathi">Marathi</choice> <choice correct="true" name="marathi">Marathi</choice>
......
...@@ -41,7 +41,7 @@ data: | ...@@ -41,7 +41,7 @@ data: |
<p>Which of the following is a fruit? Check all that apply.</p> <p>Which of the following is a fruit? Check all that apply.</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">apple <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="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> <choicehint selected="false">Remember that an apple is also a fruit.</choicehint>
......
...@@ -1822,7 +1822,7 @@ class TestProblemCheckTracking(unittest.TestCase): ...@@ -1822,7 +1822,7 @@ class TestProblemCheckTracking(unittest.TestCase):
</multiplechoiceresponse> </multiplechoiceresponse>
<p>Which of the following are musical instruments?</p> <p>Which of the following are musical instruments?</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical" label="Which of the following are musical instruments?"> <checkboxgroup label="Which of the following are musical instruments?">
<choice correct="true">a piano</choice> <choice correct="true">a piano</choice>
<choice correct="false">a tree</choice> <choice correct="false">a tree</choice>
<choice correct="true">a guitar</choice> <choice correct="true">a guitar</choice>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</multiplechoiceresponse> </multiplechoiceresponse>
<p>Which of the following are musical instruments?</p> <p>Which of the following are musical instruments?</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">a piano</choice> <choice correct="true">a piano</choice>
<choice correct="false">a tree</choice> <choice correct="false">a tree</choice>
<choice correct="true">a guitar</choice> <choice correct="true">a guitar</choice>
......
...@@ -62,7 +62,7 @@ class CourseWithoutContentGroupsTest(StaffViewTest): ...@@ -62,7 +62,7 @@ class CourseWithoutContentGroupsTest(StaffViewTest):
<problem markdown="Simple Problem" max_attempts="" weight=""> <problem markdown="Simple Problem" max_attempts="" weight="">
<p>Choose Yes.</p> <p>Choose Yes.</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">Yes</choice> <choice correct="true">Yes</choice>
</checkboxgroup> </checkboxgroup>
</choiceresponse> </choiceresponse>
...@@ -258,7 +258,7 @@ class CourseWithContentGroupsTest(StaffViewTest): ...@@ -258,7 +258,7 @@ class CourseWithContentGroupsTest(StaffViewTest):
<problem markdown="Simple Problem" max_attempts="" weight=""> <problem markdown="Simple Problem" max_attempts="" weight="">
<p>Choose Yes.</p> <p>Choose Yes.</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">Yes</choice> <choice correct="true">Yes</choice>
</checkboxgroup> </checkboxgroup>
</choiceresponse> </choiceresponse>
......
...@@ -136,7 +136,7 @@ class ContentGroupConfigurationTest(StudioCourseTest): ...@@ -136,7 +136,7 @@ class ContentGroupConfigurationTest(StudioCourseTest):
<problem markdown="Simple Problem" max_attempts="" weight=""> <problem markdown="Simple Problem" max_attempts="" weight="">
<p>Choose Yes.</p> <p>Choose Yes.</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical"> <checkboxgroup>
<choice correct="true">Yes</choice> <choice correct="true">Yes</choice>
</checkboxgroup> </checkboxgroup>
</choiceresponse> </choiceresponse>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<p>A checkboxes problem presents checkbox buttons for student input. Students can select more than one option presented.</p> <p>A checkboxes problem presents checkbox buttons for student input. Students can select more than one option presented.</p>
<p>Select the answer that matches</p> <p>Select the answer that matches</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical" label="Select the answer that matches"> <checkboxgroup label="Select the answer that matches">
<choice correct="true">correct</choice> <choice correct="true">correct</choice>
<choice correct="false">incorrect</choice> <choice correct="false">incorrect</choice>
<choice correct="true">correct</choice> <choice correct="true">correct</choice>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<p>A checkboxes problem presents checkbox buttons for student input. Students can select more than one option presented.</p> <p>A checkboxes problem presents checkbox buttons for student input. Students can select more than one option presented.</p>
<p>Select the answer that matches</p> <p>Select the answer that matches</p>
<choiceresponse> <choiceresponse>
<checkboxgroup direction="vertical" label="Select the answer that matches"> <checkboxgroup label="Select the answer that matches">
<choice correct="true">correct</choice> <choice correct="true">correct</choice>
<choice correct="false">incorrect</choice> <choice correct="false">incorrect</choice>
<choice correct="true">correct</choice> <choice correct="true">correct</choice>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment