A numerical response problem accepts a line of text input from the student, and evaluates the input for correctness based on its numerical value.
The answer is correct if it is within a specified numerical tolerance of the expected answer.
Enter the numerical value of Pi:
@@ -356,7 +356,7 @@ describe 'MarkdownEditingDescriptor', ->
When the student is ready, the explanation appears.
[Explanation]
""")
- expect(data).toEqual("""
+ expect(data).toXMLEqual("""
bleh
@@ -680,7 +680,7 @@ describe 'MarkdownEditingDescriptor', ->
Code should be nicely monospaced.
[/code]
""")
- expect(data).toEqual("""
+ expect(data).toXMLEqual("""
Not a header
diff --git a/common/lib/xmodule/xmodule/js/spec/problem/edit_spec_hint.coffee b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec_hint.coffee
index 0808afd3a5..1a9b7aad97 100644
--- a/common/lib/xmodule/xmodule/js/spec/problem/edit_spec_hint.coffee
+++ b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec_hint.coffee
@@ -25,7 +25,7 @@ describe 'Markdown to xml extended hint dropdown', ->
]]
""")
- expect(data).toEqual("""
+ expect(data).toXMLEqual("""
Translation between Dropdown and ________ is straightforward.
diff --git a/common/lib/xmodule/xmodule/js/src/problem/edit.js b/common/lib/xmodule/xmodule/js/src/problem/edit.js
index b0d6922596..0f8fc172db 100644
--- a/common/lib/xmodule/xmodule/js/src/problem/edit.js
+++ b/common/lib/xmodule/xmodule/js/src/problem/edit.js
@@ -1,4 +1,4 @@
-/* global CodeMirror, _, XModule, PrettyPrint */
+/* global CodeMirror, _, XModule */
// no-useless-escape disabled because of warnings in regexp expressions within the
// "toXML" code. When the "useless escapes" were removed, some of the unit tests
// failed, but only in Jenkins, indicating browser-specific behavior.
@@ -819,8 +819,8 @@
}
// make all responsetypes descendants of a single problem element
// safe-lint: disable=javascript-concat-html
- finalXml = '' + responseTypesXML.join('\n\n') + finalDemandHints + '';
- return PrettyPrint.xml(finalXml);
+ finalXml = '\n' + responseTypesXML.join('\n\n') + finalDemandHints + '\n';
+ return finalXml;
};
return MarkdownEditingDescriptor;