converge Split APIs with Mixed and Draft
This commit is contained in:
@@ -571,14 +571,14 @@ class SplitTestDescriptor(SplitTestFields, SequenceDescriptor, StudioEditableDes
|
||||
A mutable modulestore is needed to call this method (will need to update after mixed
|
||||
modulestore work, currently relies on mongo's create_and_save_xmodule method).
|
||||
"""
|
||||
assert hasattr(self.system, 'modulestore') and hasattr(self.system.modulestore, 'create_and_save_xmodule'), \
|
||||
assert hasattr(self.system, 'modulestore') and hasattr(self.system.modulestore, 'create_item'), \
|
||||
"editor_saved should only be called when a mutable modulestore is available"
|
||||
modulestore = self.system.modulestore
|
||||
dest_usage_key = self.location.replace(category="vertical", name=uuid4().hex)
|
||||
metadata = {'display_name': group.name}
|
||||
modulestore.create_and_save_xmodule(
|
||||
dest_usage_key,
|
||||
modulestore.create_item(
|
||||
user_id,
|
||||
dest_usage_key,
|
||||
definition_data=None,
|
||||
metadata=metadata,
|
||||
runtime=self.system,
|
||||
|
||||
Reference in New Issue
Block a user