Commit 0ec2e643 by Jonathan Piacenti

discussion-integration: Ignore query string when deriving course from URL.

parent 9dd21a04
......@@ -42,6 +42,9 @@ def course_id_from_url(url):
if '/' in url:
deprecated = True
# Ignore query string
url = url.split('?')[0]
if deprecated:
COURSE_REGEX = re.compile(r'^.*/courses/(?P<course_id>[^/]+/[^/]+/[^/]+)')
key_generator = SlashSeparatedCourseKey.from_deprecated_string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment