From 5064b3a61ac8776483b618783d1008b4a1c5db07 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 14 Jan 2026 12:30:23 -0500 Subject: [PATCH] docs: Add warning about Modulestore usage in LTI block --- xblocks_contrib/lti/lti.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xblocks_contrib/lti/lti.py b/xblocks_contrib/lti/lti.py index eafedd26..f2167225 100644 --- a/xblocks_contrib/lti/lti.py +++ b/xblocks_contrib/lti/lti.py @@ -772,6 +772,11 @@ def get_lis_result_sourcedid(self): def get_course(self): """ Return course by course id. + + Note: This only works for Modulestore-backed courses. + It will return None for Learning-Core-backed content libraries. + In general, please do not add new code that access Modulestore, because it + will not work in Learning Core. We do it here just to support a legacy feature. """ if isinstance(self.location.course_key, CourseKey): return self.runtime.modulestore.get_course(self.location.course_key)