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
405b266f
Commit
405b266f
authored
Jul 03, 2015
by
Jonathan Piacenti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressed notes.
parent
a6ae44a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
common/lib/xmodule/xmodule/modulestore/search.py
+2
-2
lms/djangoapps/courseware/tests/test_views.py
+2
-1
lms/djangoapps/courseware/url_helpers.py
+2
-2
No files found.
common/lib/xmodule/xmodule/modulestore/search.py
View file @
405b266f
...
...
@@ -44,8 +44,8 @@ def path_to_location(modulestore, usage_key):
If no path exists, return None.
If a path exists, return it as a
list with targe
t location first, and
the
starting
location last.
If a path exists, return it as a
tuple with roo
t location first, and
the
target
location last.
'''
# Standard DFS
...
...
lms/djangoapps/courseware/tests/test_views.py
View file @
405b266f
...
...
@@ -1138,7 +1138,7 @@ class TestIndexView(ModuleStoreTestCase):
@XBlock.register_temp_plugin
(
ViewCheckerBlock
,
'view_checker'
)
@ddt.data
(
ModuleStoreEnum
.
Type
.
mongo
,
ModuleStoreEnum
.
Type
.
split
)
def
test_student_state
(
self
,
default_store
,
):
def
test_student_state
(
self
,
default_store
):
"""
Verify that saved student state is loaded for xblocks rendered in the index view.
"""
...
...
@@ -1206,6 +1206,7 @@ class TestIndexView(ModuleStoreTestCase):
response
=
views
.
index
(
request
,
unicode
(
course
.
id
),
chapter
=
chapter
.
url_name
,
section
=
section
.
url_name
)
self
.
assertIn
(
"Activate Block ID: test_block_id"
,
response
.
content
)
class
TestRenderXBlock
(
RenderXBlockTestMixin
,
ModuleStoreTestCase
):
"""
Tests for the courseware.render_xblock endpoint.
...
...
lms/djangoapps/courseware/url_helpers.py
View file @
405b266f
"""
Module to define url helpers functions
"""
from
urllib
import
urlencode
from
xmodule.modulestore.search
import
path_to_location
,
navigation_index
from
xmodule.modulestore.django
import
modulestore
from
django.core.urlresolvers
import
reverse
...
...
@@ -47,7 +48,6 @@ def get_redirect_url(course_key, usage_key):
args
=
(
unicode
(
course_key
),
chapter
,
section
,
navigation_index
(
position
))
)
if
final_target_id
:
redirect_url
+=
"?activate_block_id={final_target_id}"
.
format
(
final_target_id
=
final_target_id
)
redirect_url
+=
"?{}"
.
format
(
urlencode
({
'activate_block_id'
:
unicode
(
final_target_id
)}))
return
redirect_url
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