diff --git a/common/lib/capa/capa/templates/annotationinput.html b/common/lib/capa/capa/templates/annotationinput.html index 1aa304458c..3e20c975a3 100644 --- a/common/lib/capa/capa/templates/annotationinput.html +++ b/common/lib/capa/capa/templates/annotationinput.html @@ -1,3 +1,4 @@ +<%! from openedx.core.djangolib.markup import HTML %>
@@ -59,6 +60,5 @@ % if msg: -${msg|n} +${HTML(msg)} % endif - diff --git a/common/lib/capa/capa/templates/choicegroup.html b/common/lib/capa/capa/templates/choicegroup.html index f5a8de0b8f..abb9e6234f 100644 --- a/common/lib/capa/capa/templates/choicegroup.html +++ b/common/lib/capa/capa/templates/choicegroup.html @@ -1,3 +1,4 @@ +<%! from openedx.core.djangolib.markup import HTML %> <% def is_radio_input(choice_id): return input_type == 'radio' and ((isinstance(value, basestring) and (choice_id == value)) or ( @@ -73,6 +74,6 @@
${submitted_message}
%endif % if msg: - ${msg|n} + ${HTML(msg)} % endif diff --git a/common/lib/capa/capa/templates/drag_and_drop_input.html b/common/lib/capa/capa/templates/drag_and_drop_input.html index d9bb8da90f..57803bf909 100644 --- a/common/lib/capa/capa/templates/drag_and_drop_input.html +++ b/common/lib/capa/capa/templates/drag_and_drop_input.html @@ -1,3 +1,4 @@ +<%! from openedx.core.djangolib.markup import HTML %>
@@ -23,7 +24,7 @@

% if msg: - ${msg|n} + ${HTML(msg)} % endif % if status in ['unsubmitted', 'correct', 'incorrect', 'partially-correct', 'incomplete']: diff --git a/common/lib/capa/capa/templates/filesubmission.html b/common/lib/capa/capa/templates/filesubmission.html index 40a030a09d..7b3c41dcaf 100644 --- a/common/lib/capa/capa/templates/filesubmission.html +++ b/common/lib/capa/capa/templates/filesubmission.html @@ -1,3 +1,4 @@ +<%! from openedx.core.djangolib.markup import HTML %>
@@ -9,5 +10,5 @@
-
${msg|n}
+
${HTML(msg)}
diff --git a/common/lib/capa/capa/templates/formulaequationinput.html b/common/lib/capa/capa/templates/formulaequationinput.html index 50f48b1566..bfca302e92 100644 --- a/common/lib/capa/capa/templates/formulaequationinput.html +++ b/common/lib/capa/capa/templates/formulaequationinput.html @@ -1,34 +1,38 @@ <%page expression_filter="h"/> <%! from openedx.core.djangolib.markup import HTML %> <% doinline = 'style="display:inline-block;vertical-align:top"' if inline else "" %> -
-
- - ${trailing_text} +
+
+ + % for description_id, description_text in response_data['descriptions'].items(): +

${description_text}

+ % endfor + + ${trailing_text} - - - ${status.display_name} + + + ${status.display_name} + - -

+

-
- \(\) - Loading -
-
+
+ \(\) + Loading +
+
-
+
% if msg: ${HTML(msg)} % endif -
+
diff --git a/common/lib/capa/capa/templates/optioninput.html b/common/lib/capa/capa/templates/optioninput.html index 37125f5688..ce43dcbe05 100644 --- a/common/lib/capa/capa/templates/optioninput.html +++ b/common/lib/capa/capa/templates/optioninput.html @@ -1,3 +1,4 @@ +<%! from openedx.core.djangolib.markup import HTML %> <% doinline = "inline" if inline else "" %>
@@ -29,6 +30,6 @@

% if msg: - ${msg|n} + ${HTML(msg)} % endif diff --git a/common/lib/capa/capa/templates/vsepr_input.html b/common/lib/capa/capa/templates/vsepr_input.html index 49812e3fb2..c3af6222ae 100644 --- a/common/lib/capa/capa/templates/vsepr_input.html +++ b/common/lib/capa/capa/templates/vsepr_input.html @@ -1,3 +1,4 @@ +<%! from openedx.core.djangolib.markup import HTML %>
@@ -26,7 +27,7 @@

% if msg: - ${msg|n} + ${HTML(msg)} % endif % if status in ['unsubmitted', 'correct', 'incorrect', 'partially-correct', 'incomplete']:
diff --git a/common/lib/capa/capa/tests/test_input_templates.py b/common/lib/capa/capa/tests/test_input_templates.py index dc754f0049..21b61b1608 100644 --- a/common/lib/capa/capa/tests/test_input_templates.py +++ b/common/lib/capa/capa/tests/test_input_templates.py @@ -579,7 +579,7 @@ class FormulaEquationInputTemplateTest(TemplateTestCase): Test that correct description information is set on desired elements. """ xpaths = ['//input/@aria-describedby'] - self.assert_description(xpaths, descriptions=False) + self.assert_description(xpaths) self.assert_describedby_attribute(xpaths) diff --git a/common/lib/xmodule/xmodule/css/capa/display.scss b/common/lib/xmodule/xmodule/css/capa/display.scss index 2a2eedacf8..5fcd28a630 100644 --- a/common/lib/xmodule/xmodule/css/capa/display.scss +++ b/common/lib/xmodule/xmodule/css/capa/display.scss @@ -157,12 +157,16 @@ div.problem { @include margin(($baseline*0.75), 0); } - form > label { + form > label, .problem-group-label { display: block; margin-bottom: $baseline; font: inherit; color: inherit; } + + .wrapper-problem-response:not(:last-child) { + margin-bottom: $baseline; + } } // Choice Group - silent class diff --git a/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml b/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml index bc44b78e0e..5e4fbd7040 100644 --- a/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml @@ -22,7 +22,7 @@ data: |

You can use the following example problems as models.

- +

Make a voltage divider that splits the provided voltage evenly.

@@ -53,7 +53,7 @@ data: | - +

Make a high-pass filter.

- +

Enter two integers that sum to 10.


@@ -63,7 +63,7 @@ data: | return False - +

Enter two integers that sum to 20.


diff --git a/common/lib/xmodule/xmodule/templates/problem/formularesponse.yaml b/common/lib/xmodule/xmodule/templates/problem/formularesponse.yaml index d845b5cebe..8a7801bf59 100644 --- a/common/lib/xmodule/xmodule/templates/problem/formularesponse.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/formularesponse.yaml @@ -4,52 +4,10 @@ metadata: markdown: !!null data: | -

- In math expression input problems, learners enter text that represents a - mathematical expression into a field, and text is converted to a symbolic - expression that appears below that field. You can refer learners to - - Entering Mathematical and Scientific Expressions in the EdX Learner's - Guide for information about how to enter text into the field. -

-

- Math expression problems can include unknown variables and relatively - complicated symbolic expressions. The grader uses a numerical sampling to - determine whether the student’s response matches your math expression, to a - specified numerical tolerance. You must specify the allowed variables in the - expression as well as the range of values for each variable. -

-

- To create these problems, you use MathJax to change your plain text into - "beautiful math." For more information about how to use MathJax in Studio, - see - A Brief Introduction to MathJax in Studio in Building and Running an edx - Course. -

-

- When you add the problem, be sure to select Settings - to specify a Display Name and other values that apply. -

-

You can use the following example problems as models.

- - - - Enter the equation - - - - - - - - - - - Enter the equation + +

You can use this template as a guide to the OLX markup to use for math expression problems. Edit this component to replace the example with your own assessment.

+ + You can add an optional tip or note related to the prompt like this. Example: To test this example, the correct answer is R_1*R_2/R_3
diff --git a/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml b/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml index c73b8ebea4..733fd78f83 100644 --- a/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml @@ -18,7 +18,7 @@ data: | and other values that apply.

You can use the following example problem as a model.

- +

What country is home to the Great Pyramid of Giza as well as the cities of Cairo and Memphis? Click the country on the map below.

diff --git a/common/lib/xmodule/xmodule/templates/problem/jsinput_response.yaml b/common/lib/xmodule/xmodule/templates/problem/jsinput_response.yaml index 48642ec7e4..d74836d052 100644 --- a/common/lib/xmodule/xmodule/templates/problem/jsinput_response.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/jsinput_response.yaml @@ -58,7 +58,7 @@ data: | ''' ]]> - +

In the following image, click the objects until the cone is yellow and the cube is blue.

Example Math Expression Problem

- +

What is Einstein's equation for the energy equivalent of a mass [mathjaxinline]m[/mathjaxinline]?


@@ -146,11 +146,8 @@ data: |

Example Numerical Problem

-

Energy saved =

- - - -

 EJ/year

+ +

@@ -176,7 +173,7 @@ data: | def test_add_to_ten(expect, ans): return test_add(10, ans) - +

Enter two integers that sum to 10.


@@ -197,7 +194,7 @@ data: | except ValueError: return False - +

Enter two integers that sum to 20.


@@ -213,10 +210,10 @@ data: |

Example Image Mapped Input Problem

-