In the process of trying to extract the modulestore (and "closely related code") from edx-platform I have consistently run into issues defining the scope of work in a way that made consistent sense to everyone interested in following the work. I think several of my problems boiled down to the rookie mistakes of not knowing a) what, exactly, the thing was that I was moving and b) who is the customer for the move and what do they want to gain from it?
My initial understanding was that "modulestore" was everything in edx-platform/common/lib/xmodule/xmodule/modulestore
, but once I understood more about how it worked and especially how it was being tested I bumped the target code up to everything in edx-platform/common/lib/xmodule/
. Neither of these was precisely correct and not knowing really what it was that conceptually constituted "modulestore" I've flailed a fair amount attempting to remove as much as possible on the advice of folks who have a lot more experience here than I do. I think in the end modulestore has grown beyond its original design and taken on some functionality it probably shouldn't have. Here are my best attempts at defining what modulestore is, what it does, and how it does it. Hopefully this will inform decisions related to what it should do and therefore which code might move to a new repo and what should stay.
edx-platform/common/lib/xmodule/xmodule/modulestore
, but there is also a fair amount of tightly bound code at the edx-platform/common/lib/xmodule/
level and there are code-level dependencies in a few other locations inside edx-platform.common/lib/xmodule/
Functionality that is in edx-platform/common/lib/xmodule/xmodule/modulestore:
That functionality is what I would deem "modulestore", personally. A pretty flexible way of storing off module data for course trees.
Other things that live in edx-platform/common/lib/xmodule/ and edx-platform/common/lib/xmodule/xmodule:
Places where modulestore (edx-platform/common/lib/xmodule/xmodule/modulestore) calls up to "higher level" code:
from xmodule.assetstore import AssetMetadata, CourseAssetsFromStorage
from xmodule.course_module import CourseSummary
from xmodule.error_module import ErrorDescriptor
from xmodule.errortracker import null_error_tracker, exc_info_to_str
from xmodule.exceptions import HeartbeatFailure
from xmodule.mako_module import MakoDescriptorSystem
from xmodule.mongo_utils import connect_to_mongodb, create_collection_index
from xmodule.partitions.partitions_service import PartitionService
from xmodule.services import SettingsService
split_mongo/caching_descriptor_system.py
from xmodule.library_tools import LibraryToolsService
from xmodule.mako_module import MakoDescriptorSystem
from xmodule.error_module import ErrorDescriptor
from xmodule.errortracker import exc_info_to_str
from xmodule.x_module import XModuleMixin
from xmodule.exceptions import HeartbeatFailure
from xmodule.mongo_utils import connect_to_mongodb, create_collection_index
from xmodule.course_module import CourseSummary
from xmodule.errortracker import null_error_tracker
from ..exceptions import ItemNotFoundError
from xmodule.partitions.partitions_service import PartitionService
from xmodule.error_module import ErrorDescriptor
from xmodule.assetstore import AssetMetadata
from xmodule.exceptions import InvalidVersionError
__init__.py