Commit 44ca8222 by dragonfi

Use scope_ids.user_id instead of runtime.user_id

parent 95664d4a
...@@ -194,7 +194,7 @@ class DragAndDropBlock(XBlock): ...@@ -194,7 +194,7 @@ class DragAndDropBlock(XBlock):
pass pass
self.runtime.publish(self, 'xblock.drag-and-drop-v2.item.dropped', { self.runtime.publish(self, 'xblock.drag-and-drop-v2.item.dropped', {
'user_id': self.runtime.user_id, 'user_id': self.scope_ids.user_id,
'item_id': item['id'], 'item_id': item['id'],
'location': attempt['zone'], 'location': attempt['zone'],
'is_correct': is_correct, 'is_correct': is_correct,
...@@ -224,7 +224,7 @@ class DragAndDropBlock(XBlock): ...@@ -224,7 +224,7 @@ class DragAndDropBlock(XBlock):
except KeyError as e: except KeyError as e:
return {'result': 'error', 'message': 'Missing event_type in JSON data'} return {'result': 'error', 'message': 'Missing event_type in JSON data'}
data['user_id'] = self.runtime.user_id data['user_id'] = self.scope_ids.user_id
self.runtime.publish(self, event_type, data) self.runtime.publish(self, event_type, data)
return {'result':'success'} return {'result':'success'}
......
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