Commit d94dea7d by E. Kolpakov

Improved _get_unique_id method - uses block's usage_id

parent a5c0c18b
...@@ -421,12 +421,12 @@ class DragAndDropBlock(XBlock): ...@@ -421,12 +421,12 @@ class DragAndDropBlock(XBlock):
return {'result': 'success'} return {'result': 'success'}
def _get_unique_id(self): def _get_unique_id(self):
usage_id = self.scope_ids.usage_id
try: try:
unique_id = self.location.name # pylint: disable=no-member return usage_id.name
except AttributeError: except AttributeError:
# workaround for xblock workbench # workaround for xblock workbench
unique_id = self.parent and self.parent.replace('.', '-') return usage_id
return unique_id
@staticmethod @staticmethod
def _is_correct_input(item, val): def _is_correct_input(item, val):
......
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