Commit a7b960d3 by dragonfi

Reintroduce user_id into events

parent 4085f3ee
...@@ -193,9 +193,10 @@ class DragAndDropBlock(XBlock): ...@@ -193,9 +193,10 @@ 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,
'item_id': item['id'], 'item_id': item['id'],
'location': attempt['zone'], 'location': attempt['zone'],
'is_correct': is_correct 'is_correct': is_correct,
}) })
return { return {
...@@ -222,6 +223,8 @@ class DragAndDropBlock(XBlock): ...@@ -222,6 +223,8 @@ 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
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