Skip to content

Commit

Permalink
Merge fbb6406 into 2fd330f
Browse files Browse the repository at this point in the history
  • Loading branch information
stvstnfrd committed Apr 9, 2021
2 parents 2fd330f + fbb6406 commit de5c516
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lti_consumer/plugin/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,17 @@ def user_has_access(*args, **kwargs):
def get_course_by_id(course_key):
"""
Import and run `get_course_by_id` from LMS
TODO: Once the LMS has fully switched over to this new path [1],
we can remove the legacy (LMS) import support here.
- [1] https://github.com/edx/edx-platform/pull/27289
"""
# pylint: disable=import-error,import-outside-toplevel
from lms.djangoapps.courseware.courses import get_course_by_id as lms_get_course_by_id
try:
from openedx.core.lib.courses import get_course_by_id as lms_get_course_by_id
except ImportError:
from lms.djangoapps.courseware.courses import get_course_by_id as lms_get_course_by_id
return lms_get_course_by_id(course_key)


Expand Down

0 comments on commit de5c516

Please sign in to comment.