Drag and drop the following terms so that they properly label the image below

In this Image Drag and Drop question, students can select from a list of potential answers and drag them to the correct response box on the image. There is the option of allowing more than one correct response per container.

Drag and drop the following terms so that they properly label the image below

Figure 1: Label image with drag & drop question example.

Create a question

Enter the question stem into the Compose question area. In the Add image field, upload your chosen image, or paste the image URL. For information about image requirements visit our Images page. You can add Image Alternative Text, which appears if the image cannot be displayed on a page, and Text on hover text, which appears when the mouse hovers over the image. You can then specify the Width (px) for the image.

Drag and drop the following terms so that they properly label the image below

Figure 2: uploading an image to the question.

The uploaded image preview will be shown below in the Response Containers section.

You can now add response containers to your image. Three appear by default. To add a new Response container, click on the Draw and resize option to the left of the toolbar. Then click and drag the response container to the desired size. Add pointers by selecting a response container and choosing one of the four option in the Pointers button on the toolbar. To delete a response container, select the response container and hit the delete button on the toolbar.

Drag and drop the following terms so that they properly label the image below

Figure 3: Adding response containers to an image.

In the Possible Responses section, enter all responses that the student can choose from. Clicking the +Add button will create a new response, and the trash can icon will remove that particular response. Ticking the checkbox for the Edit ARIA labels option will display a list of fields corresponding to each possible response, where meaningful ARIA labels can be entered.

Drag and drop the following terms so that they properly label the image below
 

Figure 4: Listing possible responses.

You can now configure validation for your question. Follow these steps to set up score and correct response:

This question type allows students to drag words, images or both from a list and drop them into pre-defined gaps on a base image.

How to create a question

Give the question a descriptive name to help you find it in the question bank. (Students won't see the name.)

Add the question to the text editor, using any formatting you wish.

In the Preview section, click the background image button to upload an image. Your image will then display under the file upload box.

In the Draggable items section, you can upload images if you leave the type as 'draggable image' or you can type in words if you change the type to 'draggable text'. You may have a mixture of images and text.

In the Drop zones section, you choose which items to go in which zone. Click the 'Refresh preview' button.

You can then position the items on the background image and this will add their coordinates.

Note:(1) Draggable images cannot be more than 150 x 100 pixels. If they are larger, they will be scaled on import. Remember to add a short text descriptor too. If you change your mind about an image, simply upload a different one to replace it.

Note (2) You can format draggable text using , , , , , and

Note (3) Choices that are within the same Group are colour coded and may only be dropped on a drop zone with the corresponding colour. Choices that are marked as 'Unlimited' may be used in multiple locations.

Example one

Based on the Moodle documentation Pedagogy, participants must 'climb the Moodle ladder' by ordering the stages of using Moodle as a teacher.

In the Preview section, a basic image of steps is uploaded.

In the Draggable items section, the 'type' is chosen as 'draggable text' and the text for each stage is added. (Groups and the Unlimited setting are not used in this example)

In the Drop zones section, an item from the previously added options is chosen from the drop down:

These texts will now appear under the background image:

The text boxes are dragged to their correct positions on the image (steps on the staircase) This will then add the co-ordinates to the Dropzones section automatically:

Other settings are completed (see below) and the question is saved.

Participants must drag the Moodle stages to the correct step:

Example two

Participants must add the correct country flag and capital city onto a map of Europe.

This question has images as well as text and makes use of the Groups feature.

In the Preview section, a basic map of Europe is uploaded.

In the Draggable items section, the capital cities are added as the type 'draggable text' and the flags are added as the type "draggable image"

All draggable images (the flags) are in Group 1 and all draggable text items (the capital cities) are in Group 2.

In the Drop zones section, an item from the previously added options is chosen from the drop down. The Group 1 boxes will display in a different colour from the Group 2 boxes.

When the boxes are dragged to their appropriate places on the background image, the coordinates in the Drop zones section are updated automatically.

Other settings are completed (see below) and the question is saved.

Scoring and feedback

All gaps are weighted identically. Only drop zones that are filled correctly gain marks. There is no negative marking of drop zones that are filled incorrectly.

Whether or not Combined feedback is shown to students is governed by the Specific feedback setting on the quiz settings form.

Penalty for each incorrect try: The available mark is reduced by the penalty for second and subsequent tries. In the example above a correct answer at the second try will score 0.6666667 of the available marks and a correct answer at the third try will score 0.3333334 of the available marks.

If the question is used in 'interactive with multiple tries' behaviour the marking is modified as follows:

  1. The mark is reduced for each try by the penalty factor.
  2. Allowance is made for when a correct choice is first chosen providing it remains chosen in subsequent tries.

Hint: You can complete as many of these boxes as you wish. If you wish to give the student three tries at a question you will need to provide two hints. At runtime when the hints are exhausted the question will finish and the student will be given the general feedback and the question score will be calculated.

Clear incorrect responses: When ‘Try again’ is clicked incorrect choices are cleared.

Show the number of correct responses: Include in the feedback a statement of how many choices are correct.

Accessibility

Drag and drop questions are keyboard accessible. Use thekey to move between the drop zones and thekey to cycle around the possible choices for each drop zone.

Note: This question type is not accessible to users who are visually impaired.

Example (muscles in anatomy)

    • New questions (3 and 4) which use additional CSS code, look nice and they work perfectly:
    • In order to make the text markers more look-alike the conventional legends of scientific diagrams, I (Joseph Rézeau) have added a few CSS rules to my local site's Administration / Appearance / Additional HTML /When BODY is opened CSS as follows:

    • In order to have the correct responses remain in place, you have to do the following: When editing the drag & drop question, go to the Multiple Tries section and under Hint 1 options tick Options Clear incorrect responses.

See also

This question type was originally developed by the UK Open University and was a contributed plugin for several years before becoming part of standard Moodle. Find more Open University plugins here.