Reverted last commit due to concerns about database writes.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user