Courses in LMS#
Status#
Accepted
Context#
Note: Within the context of the LMS, “Course” means “Course Runs”, as defined in the edX DDD Ubiquitous Language.
In the LMS, the following technologies can be used to access course content and metadata:
Course Overviews: Provides performant access to course metadata.
Course Blocks: Provides performant access to the blocks in a course, including filtering and access control capabilities.
Modulestore - Contains all course related data, including course metadata, course blocks, and student module data. Course Overviews and Course Blocks are performant read-optimized versions of subsets of data in the Modulestore.
Decisions#
When coding in the LMS, prefer to use Course Overviews and Course Blocks, rather than the Modulestore, for the following reasons:
Course Overviews and Course Blocks are optimized for read-access for Learners.
We eventually want to separate the LMS from Studio. Studio can have its own read-write storage layer (currently Modulestore).
Course Overviews#
Use Course Overviews when you just need course metadata and not the course context. For example, call get_course_overview_with_access() in place of get_course_with_access. If Course Overviews doesn’t contain the data you need, expand its model or create a new joint table (if the newly desired data is conceptually different from what’s in Course Overviews).
Example: See example use of course overviews in the course outline feature.
Course Blocks#
Use Course Blocks instead of loading a full course directly from the modulestore.
Example: See example of using course blocks in the course outline feature.
User’s Course State#
If you need to combine user data with Course Blocks data, load the users’s data directly from the Courseware Student Module instead of loading the course from the Modulestore.
Example: See example loading the student module data in the course outline feature.
Tech Debt#
At this time, LMS courseware rendering still uses the Modulestore instead of Course Blocks. This is technical debt that needs to be addressed, so we can have a fuller separation between the storage systems.
Consequences#
LMS-specific course content storage will evolve separately from Studio’s storage, allowing for decoupled optimizations.
LMS views will perform better when using storage that is read-optimized.