Added block_id to course blocks API response.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user