Files
edx-platform/lms/djangoapps/learner_dashboard/utils.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

19 lines
405 B
Python

"""
The utility methods and functions to help the djangoapp logic
"""
import six
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 = six.text_type(FAKE_COURSE_KEY)
return path.split(course_id)[0]