Commit 33f9eae3 by Calen Pennington

Set data_dir based on parent data_dir when cloning new content in the CMS

parent e9358f0e
......@@ -382,6 +382,10 @@ def clone_item(request):
new_item = modulestore().clone_item(template, dest_location)
new_item.metadata['display_name'] = display_name
# TODO: This needs to be deleted when we have proper storage for static content
new_item.metadata['data_dir'] = parent.metadata['data_dir']
modulestore().update_metadata(new_item.location.url(), new_item.own_metadata)
modulestore().update_children(parent_location, parent.definition.get('children', []) + [new_item.location.url()])
......
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