Files
edx-platform/lms/djangoapps/learner_dashboard/utils.py
Stu Young 0f1c391134 incr-275 (#20584)
* run python modernize

* run isort

* quality fixed

* quality
2019-05-16 13:44:02 -04:00

19 lines
443 B
Python

"""
The utility methods and functions to help the djangoapp logic
"""
from __future__ import absolute_import
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]