Commit ac238737 by Christopher Lee Committed by GitHub

Merge pull request #14233 from edx/clee/block_id

Added block_id to course blocks API response.
parents b816982b abe39616
......@@ -37,6 +37,7 @@ class BlockSerializer(serializers.Serializer): # pylint: disable=abstract-metho
# create response data dict for basic fields
data = {
'id': unicode(block_key),
'block_id': unicode(block_key.block_id),
'lms_web_url': reverse(
'jump_to',
kwargs={'course_id': unicode(block_key.course_key), 'location': unicode(block_key)},
......
......@@ -64,7 +64,7 @@ class TestBlockSerializerBase(SharedModuleStoreTestCase):
)
self.assertEquals(
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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment