diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 0e6d81bdeb..da8b5b4f96 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -171,9 +171,7 @@ class CapaModule(CapaFields, XModule): # add extra info and raise raise Exception(msg), None, sys.exc_info()[2] - # Ensure that the module state matches the state of the - # capa problem - self.set_state_from_lcp() + self.set_state_from_lcp() def new_lcp(self, state, text=None): if text is None: diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index fa6d7ce724..60e51fd725 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -868,7 +868,10 @@ class CapaModuleTest(unittest.TestCase): module = CapaFactory.create(rerandomize=rerandomize) # Get the seed - seed = module.seed + # This isn't stored in the XModule until + # we check/save/reset the problem, so we + # access the lcp seed directly + seed = module.lcp.seed self.assertTrue(seed is not None) # If we're not rerandomizing, the seed is always set @@ -928,7 +931,10 @@ class CapaModuleTest(unittest.TestCase): module = CapaFactory.create(rerandomize=rerandomize) # Get the seed - seed = module.seed + # This isn't stored in the XModule until + # we check/save/reset the problem, so we + # access the lcp seed directly + seed = module.lcp.seed # We do NOT want the seed to reset if rerandomize # is set to 'never' -- it should still be 1