Commit 0e05549e by Dmitry Viskov Committed by Bill Filler

WYSISYG editor for prompts (in studio) - backward compatibility added

parent b5adcfa1
...@@ -229,7 +229,7 @@ class StudioMixin(object): ...@@ -229,7 +229,7 @@ class StudioMixin(object):
self.title = data['title'] self.title = data['title']
self.display_name = data['title'] self.display_name = data['title']
self.prompts = data['prompts'] self.prompts = data['prompts']
self.prompt_type = data['prompt_type'] self.prompts_type = data['prompts_type']
self.rubric_criteria = data['criteria'] self.rubric_criteria = data['criteria']
self.rubric_assessments = data['assessments'] self.rubric_assessments = data['assessments']
self.editor_assessments_order = data['editor_assessments_order'] self.editor_assessments_order = data['editor_assessments_order']
......
...@@ -498,6 +498,7 @@ class SubmissionMixin(object): ...@@ -498,6 +498,7 @@ class SubmissionMixin(object):
"xblock_id": self.get_xblock_id(), "xblock_id": self.get_xblock_id(),
"text_response": self.text_response, "text_response": self.text_response,
"file_upload_response": self.file_upload_response, "file_upload_response": self.file_upload_response,
"prompts_type": self.prompts_type,
} }
# Due dates can default to the distant future, in which case # Due dates can default to the distant future, in which case
......
...@@ -125,7 +125,7 @@ class SubmissionTest(XBlockHandlerTestCase): ...@@ -125,7 +125,7 @@ class SubmissionTest(XBlockHandlerTestCase):
def test_prompt_line_breaks(self, xblock): def test_prompt_line_breaks(self, xblock):
# Verify that prompts with multiple lines retain line breaks # Verify that prompts with multiple lines retain line breaks
resp = self.request(xblock, 'render_submission', json.dumps(dict())) resp = self.request(xblock, 'render_submission', json.dumps(dict()))
expected_prompt = u"Line 1\n\nLine 2\n\n\nLine 3" expected_prompt = u"<p><br />Line 1</p><p>Line 2</p><p>Line 3<br /></p>"
self.assertIn(expected_prompt, resp) self.assertIn(expected_prompt, resp)
@mock_s3 @mock_s3
......
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