From c8898b0afc6c4f32f680e897e212afaf106c318b Mon Sep 17 00:00:00 2001 From: John Eskew <jeskew@edx.org> Date: Thu, 2 Oct 2014 11:32:17 -0400 Subject: [PATCH] Use: CourseLocator.from_string() instead of: SlashSeparatedCourseKey.from_deprecated_string() to construct the course_key for which the auto-created user is registered. --- common/djangoapps/student/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 6adca7a26cb..02d9ca587b2 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -57,6 +57,7 @@ from dark_lang.models import DarkLangConfig from xmodule.modulestore.django import modulestore from opaque_keys import InvalidKeyError from opaque_keys.edx.locations import SlashSeparatedCourseKey +from opaque_keys.edx.locator import CourseLocator from xmodule.modulestore import ModuleStoreEnum from collections import namedtuple @@ -1674,7 +1675,7 @@ def auto_auth(request): course_id = request.GET.get('course_id', None) course_key = None if course_id: - course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) + course_key = CourseLocator.from_string(course_id) role_names = [v.strip() for v in request.GET.get('roles', '').split(',') if v.strip()] # Get or create the user object -- GitLab