Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
9f5273a7
Commit
9f5273a7
authored
Dec 07, 2015
by
Christine Lytwynec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pr fixes
parent
3b217df9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
common/djangoapps/student/tests/test_auto_auth.py
+2
-2
common/djangoapps/student/views.py
+3
-3
No files found.
common/djangoapps/student/tests/test_auto_auth.py
View file @
9f5273a7
...
...
@@ -194,7 +194,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
# Check that the redirect was to the course info/outline page
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
):
# Create user and redirect to 'home' (cms) or 'dashboard' (lms)
...
...
@@ -206,7 +206,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
# Check that the redirect was to either /dashboard or /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
):
"""
...
...
common/djangoapps/student/views.py
View file @
9f5273a7
...
...
@@ -1824,7 +1824,7 @@ def auto_auth(request):
if
course_id
:
course_key
=
CourseLocator
.
from_string
(
course_id
)
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
form
=
AccountCreationForm
(
...
...
@@ -1895,13 +1895,13 @@ def auto_auth(request):
# redirect to course info page in LMS
redirect_url
=
reverse
(
'info'
,
kwargs
=
{
'course_id'
:
unicode
(
course_id
)
}
kwargs
=
{
'course_id'
:
course_id
}
)
except
NoReverseMatch
:
# redirect to course outline page in Studio
redirect_url
=
reverse
(
'course_handler'
,
kwargs
=
{
'course_key_string'
:
unicode
(
course_key
)
}
kwargs
=
{
'course_key_string'
:
course_id
}
)
else
:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment