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
7356054c
Commit
7356054c
authored
Jun 02, 2017
by
Robert Raposa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert: Course jump tos should go to the main course home page.
Revert commit:
c14f0b14
parent
b97af89f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
11 deletions
+3
-11
common/test/acceptance/tests/studio/test_studio_outline.py
+0
-2
lms/djangoapps/courseware/url_helpers.py
+1
-6
lms/djangoapps/courseware/views/views.py
+2
-3
No files found.
common/test/acceptance/tests/studio/test_studio_outline.py
View file @
7356054c
...
@@ -1439,8 +1439,6 @@ class DefaultStatesContentTest(CourseOutlineTest):
...
@@ -1439,8 +1439,6 @@ class DefaultStatesContentTest(CourseOutlineTest):
__test__
=
True
__test__
=
True
# TODO: TNL-6546: Removing unified_course_view_flag
# This test will need to be rewritten to point to the new course home page.
def
test_view_live
(
self
):
def
test_view_live
(
self
):
"""
"""
Scenario: View Live version from course outline
Scenario: View Live version from course outline
...
...
lms/djangoapps/courseware/url_helpers.py
View file @
7356054c
...
@@ -9,15 +9,12 @@ from xmodule.modulestore.search import path_to_location, navigation_index
...
@@ -9,15 +9,12 @@ from xmodule.modulestore.search import path_to_location, navigation_index
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
# TODO: TNL-6547: Remove unified_course_view parameter
def
get_redirect_url
(
course_key
,
usage_key
):
def
get_redirect_url
(
course_key
,
usage_key
,
unified_course_view
=
False
):
""" Returns the redirect url back to courseware
""" Returns the redirect url back to courseware
Args:
Args:
course_id(str): Course Id string
course_id(str): Course Id string
location(str): The location id of course component
location(str): The location id of course component
unified_course_view (bool): temporary parameter while this feature is behind a waffle flag.
Is the unified_course_view waffle flag on?
Raises:
Raises:
ItemNotFoundError if no data at the location or NoPathToItem if location not in any class
ItemNotFoundError if no data at the location or NoPathToItem if location not in any class
...
@@ -25,8 +22,6 @@ def get_redirect_url(course_key, usage_key, unified_course_view=False):
...
@@ -25,8 +22,6 @@ def get_redirect_url(course_key, usage_key, unified_course_view=False):
Returns:
Returns:
Redirect url string
Redirect url string
"""
"""
if
usage_key
.
block_type
==
'course'
and
unified_course_view
:
return
reverse
(
'openedx.course_experience.course_home'
,
args
=
[
unicode
(
course_key
)])
(
(
course_key
,
chapter
,
section
,
vertical_unused
,
course_key
,
chapter
,
section
,
vertical_unused
,
...
...
lms/djangoapps/courseware/views/views.py
View file @
7356054c
...
@@ -207,7 +207,7 @@ def jump_to_id(request, course_id, module_id):
...
@@ -207,7 +207,7 @@ def jump_to_id(request, course_id, module_id):
@ensure_csrf_cookie
@ensure_csrf_cookie
def
jump_to
(
request
,
course_id
,
location
):
def
jump_to
(
_
request
,
course_id
,
location
):
"""
"""
Show the page that contains a specific location.
Show the page that contains a specific location.
...
@@ -222,8 +222,7 @@ def jump_to(request, course_id, location):
...
@@ -222,8 +222,7 @@ def jump_to(request, course_id, location):
except
InvalidKeyError
:
except
InvalidKeyError
:
raise
Http404
(
u"Invalid course_key or usage_key"
)
raise
Http404
(
u"Invalid course_key or usage_key"
)
try
:
try
:
unified_course_view
=
waffle
.
flag_is_active
(
request
,
UNIFIED_COURSE_VIEW_FLAG
)
redirect_url
=
get_redirect_url
(
course_key
,
usage_key
)
redirect_url
=
get_redirect_url
(
course_key
,
usage_key
,
unified_course_view
=
unified_course_view
)
except
ItemNotFoundError
:
except
ItemNotFoundError
:
raise
Http404
(
u"No data at this location: {0}"
.
format
(
usage_key
))
raise
Http404
(
u"No data at this location: {0}"
.
format
(
usage_key
))
except
NoPathToItem
:
except
NoPathToItem
:
...
...
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