Skip to content
Snippets Groups Projects
Unverified Commit cf989502 authored by Feanil Patel's avatar Feanil Patel Committed by GitHub
Browse files

Merge pull request #21830 from edx/jmbowman/BOM-774

Fix deprecated drag and drop grading BOM-774
parents 69712ddd e93b3a9a
Branches
Tags release-2020-06-18-12.21
No related merge requests found
......@@ -287,7 +287,7 @@ class DragAndDrop(object):
def __init__(self, correct_answer, user_answer):
""" Populates DragAndDrop variables from user_answer and correct_answer.
If correct_answer is dict, converts it to list.
Correct answer in dict form is simpe structure for fast and simple
Correct answer in dict form is simple structure for fast and simple
grading. Example of correct answer dict example::
correct_answer = {'name4': 't1',
......@@ -340,7 +340,8 @@ class DragAndDrop(object):
# Convert from dict answer format to list format.
if isinstance(correct_answer, dict):
tmp = []
for key, value in correct_answer.items():
for key in sorted(correct_answer.keys()):
value = correct_answer[key]
tmp.append({
'draggables': [key],
'targets': [value],
......
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