From 73477ec1bf1177ea1ad84a636404a80afefa03fa Mon Sep 17 00:00:00 2001 From: ichuang Date: Fri, 12 Oct 2012 21:06:15 -0400 Subject: [PATCH] reset_problem in capa_module should always return dicts not strings --- 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 f6054c494d..4e6a27c14e 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -618,12 +618,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"]: