Commit c8898b0a by John Eskew Committed by Don Mitchell

Use:

	CourseLocator.from_string()
instead of:
	SlashSeparatedCourseKey.from_deprecated_string()
to construct the course_key for which the auto-created user is registered.
parent 324a1da6
...@@ -57,6 +57,7 @@ from dark_lang.models import DarkLangConfig ...@@ -57,6 +57,7 @@ from dark_lang.models import DarkLangConfig
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
from opaque_keys import InvalidKeyError from opaque_keys import InvalidKeyError
from opaque_keys.edx.locations import SlashSeparatedCourseKey from opaque_keys.edx.locations import SlashSeparatedCourseKey
from opaque_keys.edx.locator import CourseLocator
from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore import ModuleStoreEnum
from collections import namedtuple from collections import namedtuple
...@@ -1674,7 +1675,7 @@ def auto_auth(request): ...@@ -1674,7 +1675,7 @@ def auto_auth(request):
course_id = request.GET.get('course_id', None) course_id = request.GET.get('course_id', None)
course_key = None course_key = None
if course_id: 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()] role_names = [v.strip() for v in request.GET.get('roles', '').split(',') if v.strip()]
# Get or create the user object # Get or create the user object
......
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