From 42246142ddff7c4c760ecfa77958d6e6aa83d9de Mon Sep 17 00:00:00 2001 From: Don Mitchell Date: Mon, 7 Jan 2013 11:50:37 -0500 Subject: [PATCH] Numerical response now works and round tripping works. --- common/lib/xmodule/xmodule/js/src/problem/edit.coffee | 3 +++ .../xmodule/xmodule/templates/problem/numericalresponse.yaml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee index 910b670e16..e6afda8f8f 100644 --- a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee @@ -135,6 +135,9 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor // rid white space xml = xml.replace(/\n\n\n/g, '\n'); + + // surround w/ problem tag + xml = '\n' + xml + '\n'; return xml; } diff --git a/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml b/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml index 8413105cba..7ac4daa88a 100644 --- a/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml @@ -3,7 +3,8 @@ metadata: display_name: Numerical Response rerandomize: never showanswer: always - markdown: "A numerical response problem accepts a line of text input from the + markdown: | + A numerical response problem accepts a line of text input from the student, and evaluates the input for correctness based on its numerical value. @@ -18,7 +19,6 @@ metadata: Enter the number of fingers on a human hand: = 5 - " data: |