Create the data dir to put files in, if it doesn't exist when loading a module from mongo
This commit is contained in:
@@ -153,7 +153,12 @@ class MongoModuleStore(ModuleStoreBase):
|
||||
Load an XModuleDescriptor from item, using the children stored in data_cache
|
||||
"""
|
||||
data_dir = item.get('metadata', {}).get('data_dir', item['location']['course'])
|
||||
resource_fs = OSFS(self.fs_root / data_dir)
|
||||
root = self.fs_root / data_dir
|
||||
|
||||
if not root.isdir():
|
||||
root.mkdir()
|
||||
|
||||
resource_fs = OSFS(root)
|
||||
|
||||
system = CachingDescriptorSystem(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user