Files
edx-platform/lms/djangoapps/learner_dashboard/utils.py
usamasadiq 3f1df8eb2a Ran pyupgrade on lms/djangoapps
Ran pyupgrade on lms/djangoapps/instructor_analytics
Ran pyugprade on lms/djangoapps/instructor_task
Ran pyupgrade on lms/djangoapps/learner_dashboard
2021-02-19 17:30:59 +05:00

18 lines
384 B
Python

"""
The utility methods and functions to help the djangoapp logic
"""
from opaque_keys.edx.keys import CourseKey
FAKE_COURSE_KEY = CourseKey.from_string('course-v1:fake+course+run')
def strip_course_id(path):
"""
The utility function to help remove the fake
course ID from the url path
"""
course_id = str(FAKE_COURSE_KEY)
return path.split(course_id)[0]