--- metadata: display_name: Drag and Drop (Deprecated Version) markdown: !!null showanswer: never data: |

In drag and drop problems, students respond to a question by dragging text or objects to a specific location on an image.

For more information, see Drag and Drop Problem (Deprecated) in Building and Running an edX Course.

When you add the problem, be sure to select Settings to specify a Display Name and other values that apply.

You can use the following example problems as models.


Simple Drag and Drop

Drag each word in the scrollbar to the bucket that matches the number of letters in the word.

correct_answer = { '1': [[70, 150], 121], '6': [[190, 150], 121], '8': [[190, 150], 121], '2': [[310, 150], 121], '9': [[310, 150], 121], '11': [[310, 150], 121], '4': [[420, 150], 121], '7': [[420, 150], 121], '3': [[550, 150], 121], '5': [[550, 150], 121], '10': [[550, 150], 121]} if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']

Drag and Drop with Outline

Label the hydrogen atoms connected with the left carbon atom.

correct_answer = [{ 'draggables': ['1', '2'], 'targets': ['t2', 't3', 't4' ], 'rule':'anyof' }] if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']