Commit 7f004872 by Will Daly

Reverted last commit due to concerns about database writes.

parent b76adb4b
...@@ -171,9 +171,7 @@ class CapaModule(CapaFields, XModule): ...@@ -171,9 +171,7 @@ class CapaModule(CapaFields, XModule):
# add extra info and raise # add extra info and raise
raise Exception(msg), None, sys.exc_info()[2] raise Exception(msg), None, sys.exc_info()[2]
# Ensure that the module state matches the state of the self.set_state_from_lcp()
# capa problem
self.set_state_from_lcp()
def new_lcp(self, state, text=None): def new_lcp(self, state, text=None):
if text is None: if text is None:
......
...@@ -868,7 +868,10 @@ class CapaModuleTest(unittest.TestCase): ...@@ -868,7 +868,10 @@ class CapaModuleTest(unittest.TestCase):
module = CapaFactory.create(rerandomize=rerandomize) module = CapaFactory.create(rerandomize=rerandomize)
# Get the seed # 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) self.assertTrue(seed is not None)
# If we're not rerandomizing, the seed is always set # If we're not rerandomizing, the seed is always set
...@@ -928,7 +931,10 @@ class CapaModuleTest(unittest.TestCase): ...@@ -928,7 +931,10 @@ class CapaModuleTest(unittest.TestCase):
module = CapaFactory.create(rerandomize=rerandomize) module = CapaFactory.create(rerandomize=rerandomize)
# Get the seed # 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 # We do NOT want the seed to reset if rerandomize
# is set to 'never' -- it should still be 1 # is set to 'never' -- it should still be 1
......
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