Commit 9f5273a7 by Christine Lytwynec

pr fixes

parent 3b217df9
...@@ -194,7 +194,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase): ...@@ -194,7 +194,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
# Check that the redirect was to the course info/outline page # Check that the redirect was to the course info/outline page
urls = ('/info', 'course/{}'.format(course_key.to_deprecated_string())) urls = ('/info', 'course/{}'.format(course_key.to_deprecated_string()))
response.url.endswith(urls) # pylint: disable=no-member self.assertTrue(response.url.endswith(urls)) # pylint: disable=no-member
def test_redirect_to_main(self): def test_redirect_to_main(self):
# Create user and redirect to 'home' (cms) or 'dashboard' (lms) # Create user and redirect to 'home' (cms) or 'dashboard' (lms)
...@@ -206,7 +206,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase): ...@@ -206,7 +206,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
# Check that the redirect was to either /dashboard or /home # Check that the redirect was to either /dashboard or /home
urls = ('/dashboard', '/home') urls = ('/dashboard', '/home')
response.url.endswith(urls) # pylint: disable=no-member self.assertTrue(response.url.endswith(urls)) # pylint: disable=no-member
def _auto_auth(self, params=None, status_code=None, **kwargs): def _auto_auth(self, params=None, status_code=None, **kwargs):
""" """
......
...@@ -1824,7 +1824,7 @@ def auto_auth(request): ...@@ -1824,7 +1824,7 @@ def auto_auth(request):
if course_id: if course_id:
course_key = CourseLocator.from_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()]
redirect_when_done = request.GET.get('redirect', None) redirect_when_done = request.GET.get('redirect', '').lower() == 'true'
login_when_done = 'no_login' not in request.GET login_when_done = 'no_login' not in request.GET
form = AccountCreationForm( form = AccountCreationForm(
...@@ -1895,13 +1895,13 @@ def auto_auth(request): ...@@ -1895,13 +1895,13 @@ def auto_auth(request):
# redirect to course info page in LMS # redirect to course info page in LMS
redirect_url = reverse( redirect_url = reverse(
'info', 'info',
kwargs={'course_id': unicode(course_id)} kwargs={'course_id': course_id}
) )
except NoReverseMatch: except NoReverseMatch:
# redirect to course outline page in Studio # redirect to course outline page in Studio
redirect_url = reverse( redirect_url = reverse(
'course_handler', 'course_handler',
kwargs={'course_key_string': unicode(course_key)} kwargs={'course_key_string': course_id}
) )
else: else:
try: try:
......
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