Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: Drag and Drop question tutorial.

Drag and Drop question tutorial

From MoodleDocs
Revision as of 17:12, 1 May 2006 by Darren Smith (talk | contribs) (Added tutorial category)

Tutorial: A simple example

I want to make a drag and drop question for a beginning french class - to test the knowledge of the words pomme(apple), orange, and grenouille(frog). To do so, I will use a background image with these words, and images of an apple, orange, and frog. I create the images and upload them to my moodle course files.

Words.jpg

Frog.gif Orange transparent.gif Apple transparent.gif

Then I edit a new drag and drop question. For this example, I've left the "Text" field empty. If some text is entered here, it will be shown under the initial position of the drag and drop image during the quiz.

Editing screen1.jpg
(Note that the fields "Image: X, Y, Width, Height:", " Hotspot: X, Y,
Width, Height :", and " Alternative hotspots :" can be ignored.  These
are for advanced usage - when you need to align images accurate to the
pixel, or when you need to have more than one possible "correct" hotspot
for an image.  The x,y,width,height values will automatically be filled
in when graphically positioning the images/hotspots in the second step.)

Then I click on "Position the hotspots" to proceed to the second step.

Initially, the images are underneath the background image:

Editing screen2-1.jpg

I drag and drop the images to where they should be:

Editing screen2-2.jpg

Now, I want to position the hotspots. When the student answers the question, if any part of the drag and drop image overlaps it's hotspot, it will be considered correctly positioned. I click the button "Snap hotspots to all images". The hotspots are the red boxes that appear:

Editing screen2-3.jpg

I'd like to position the hotspots so that they cover each word, but not any of the empty space around each word. With the images and the hotspots both visible, it's hard to see what I need to see - the words on the background image. It could also be a little difficult to reposition and resize the hotspots, because it is easy to click on the drag and drop image instead of the hotspot. To make life easier, I click on the button "Hide images".

Editing screen2-4.jpg

Now I can see the background image without the drag and drop images getting in the way. By holding down the shift key as I click and drag on the lower-right side of the hotspots, I can resize the hotspots. Without the shift key pressed, I can position the hotspots by dragging them. When I'm done, it looks like this:

Editing screen2-5.jpg

Satisfied, I click on the button "Save and continue". This finishes the editing of the question.

When added to a quiz, the question looks like this:

Quiz view.jpg
Quiz view-2.jpg