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
fc210ad6
Commit
fc210ad6
authored
Jul 18, 2016
by
Syed Hassan Raza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix inline comments
parent
663a605a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lms/djangoapps/course_api/blocks/api.py
+2
-2
lms/djangoapps/course_api/blocks/tests/test_api.py
+1
-1
No files found.
lms/djangoapps/course_api/blocks/api.py
View file @
fc210ad6
...
...
@@ -67,9 +67,9 @@ def get_blocks(
blocks
=
get_course_blocks
(
user
,
usage_key
,
transformers
)
except
KeyError
:
# If KeyError raises trying to exchange usage_key between mongo and split modulestores may fix the error.
if
usage_key
.
deprecated
:
#
old_mongo usage_key changing this to split usage_key.
if
usage_key
.
deprecated
:
#
old_mongo usage_key changing this to split usage_key.
new_usage_key_string
=
"block-v1:"
+
usage_key
.
_to_string
()
else
:
#
split usage_key change this to old_mongo usage_key.
else
:
#
split usage_key change this to old_mongo usage_key.
new_usage_key_string
=
usage_key
.
_to_deprecated_string
()
usage_key
=
BlockUsageLocator
.
from_string
(
new_usage_key_string
)
.
replace
(
org
=
usage_key
.
org
,
run
=
usage_key
.
run
,
...
...
lms/djangoapps/course_api/blocks/tests/test_api.py
View file @
fc210ad6
...
...
@@ -120,7 +120,7 @@ class TestGetBlocks(SharedModuleStoreTestCase):
org
=
'test_org'
,
run
=
'test_run'
,
course
=
'test_course'
)
update_course_in_cache
(
self
.
course
.
id
)
#
updating the cache as get_blocks get the blocks from this.
update_course_in_cache
(
self
.
course
.
id
)
#
updating the cache as get_blocks get the blocks from this.
course_key
=
CourseKey
.
from_string
(
'test_org/test_course/test_run'
)
old_mongo_usage_key
=
modulestore
()
.
make_course_usage_key
(
course_key
)
...
...
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