From 3c8830f3b0b93d12efab734f25adaa7b38462217 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 14 Oct 2012 12:57:58 -0400 Subject: [PATCH] reset_problem in capa_module should always return dicts not strings this is for the master branch (versus cms-master) --- common/lib/xmodule/xmodule/capa_module.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 540a4edc9f..634c360550 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -624,12 +624,14 @@ class CapaModule(XModule): if self.closed(): event_info['failure'] = 'closed' self.system.track_function('reset_problem_fail', event_info) - return "Problem is closed" + return {'success': False, + 'error': "Problem is closed"} if not self.lcp.done: event_info['failure'] = 'not_done' self.system.track_function('reset_problem_fail', event_info) - return "Refresh the page and make an attempt before resetting." + return {'success': False, + 'error': "Refresh the page and make an attempt before resetting."} self.lcp.do_reset() if self.rerandomize in ["always", "onreset"]: