From a60ec13d3a8a0858e111c09cfe788a7ad5314965 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Tue, 2 Oct 2012 11:58:24 -0400 Subject: [PATCH] fix bug with editing HTML. The save() method should now return a dictionary, not a string --- cms/djangoapps/contentstore/views.py | 1 + common/lib/xmodule/xmodule/js/src/html/edit.coffee | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 4a6cb4787b..2d27a1d258 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -364,6 +364,7 @@ def save_item(request): if not has_access(request.user, item_location): raise Http404 # TODO (vshnayder): better error + logging.debug(request.POST['data']) if request.POST['data']: data = request.POST['data'] modulestore().update_item(item_location, data) diff --git a/common/lib/xmodule/xmodule/js/src/html/edit.coffee b/common/lib/xmodule/xmodule/js/src/html/edit.coffee index b2ed0aebf8..b7699953e6 100644 --- a/common/lib/xmodule/xmodule/js/src/html/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/html/edit.coffee @@ -4,4 +4,6 @@ class @HTMLEditingDescriptor mode: "text/html" }) - save: -> @edit_box.getValue() + save: -> + data: @edit_box.getValue() +