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
ac238737
Commit
ac238737
authored
Jan 03, 2017
by
Christopher Lee
Committed by
GitHub
Jan 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14233 from edx/clee/block_id
Added block_id to course blocks API response.
parents
b816982b
abe39616
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
lms/djangoapps/course_api/blocks/serializers.py
+1
-0
lms/djangoapps/course_api/blocks/tests/test_serializers.py
+1
-1
No files found.
lms/djangoapps/course_api/blocks/serializers.py
View file @
ac238737
...
@@ -37,6 +37,7 @@ class BlockSerializer(serializers.Serializer): # pylint: disable=abstract-metho
...
@@ -37,6 +37,7 @@ class BlockSerializer(serializers.Serializer): # pylint: disable=abstract-metho
# create response data dict for basic fields
# create response data dict for basic fields
data
=
{
data
=
{
'id'
:
unicode
(
block_key
),
'id'
:
unicode
(
block_key
),
'block_id'
:
unicode
(
block_key
.
block_id
),
'lms_web_url'
:
reverse
(
'lms_web_url'
:
reverse
(
'jump_to'
,
'jump_to'
,
kwargs
=
{
'course_id'
:
unicode
(
block_key
.
course_key
),
'location'
:
unicode
(
block_key
)},
kwargs
=
{
'course_id'
:
unicode
(
block_key
.
course_key
),
'location'
:
unicode
(
block_key
)},
...
...
lms/djangoapps/course_api/blocks/tests/test_serializers.py
View file @
ac238737
...
@@ -64,7 +64,7 @@ class TestBlockSerializerBase(SharedModuleStoreTestCase):
...
@@ -64,7 +64,7 @@ class TestBlockSerializerBase(SharedModuleStoreTestCase):
)
)
self
.
assertEquals
(
self
.
assertEquals
(
set
(
serialized_block
.
iterkeys
()),
set
(
serialized_block
.
iterkeys
()),
{
'id'
,
'type'
,
'lms_web_url'
,
'student_view_url'
},
{
'id'
,
'
block_id'
,
'
type'
,
'lms_web_url'
,
'student_view_url'
},
)
)
def
add_additional_requested_fields
(
self
,
context
=
None
):
def
add_additional_requested_fields
(
self
,
context
=
None
):
...
...
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