From 395cf147bee52577897f3b5ea6ee1d256c129752 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 27 Jul 2012 15:24:24 -0400 Subject: [PATCH] Look up data_dir in the metadata, not in the top of the json object when loading from mongodb --- common/lib/xmodule/xmodule/modulestore/mongo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/modulestore/mongo.py b/common/lib/xmodule/xmodule/modulestore/mongo.py index e0e3f4ad9d..df4e20f3a7 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo.py @@ -141,8 +141,9 @@ class MongoModuleStore(ModuleStore): """ Load an XModuleDescriptor from item, using the children stored in data_cache """ - resource_fs = OSFS(self.fs_root / item.get('data_dir', - item['location']['course'])) + data_dir = item.get('metadata', {}).get('data_dir', item['location']['course']) + resource_fs = OSFS(self.fs_root / data_dir) + system = CachingDescriptorSystem( self, data_cache,