Question types: Drag and drop onto image

Maintained by Tim at Lone Pine Koala SanctuaryTim Hunt, Picture of Jamie PrattJamie Pratt, Picture of Phil ButcherPhil Butcher
As of Moodle 3.0, this question type is part of the standard Moodle release. That is why there is no plugin from Moodle 3.x. You don't need one!
253 sites
82 fans
Current versions available: 6

As of Moodle 3.0, this question type is part of the standard Moodle release. That is why there is no plugin from Moodle 3.x. You don't need one!

There are working examples in eAssessment with Moodle on our OpenLearn site.

The documentation is in How to create questions in Moodle on that site.

Demonstration of this question type courtesy of Dot Garman.


This plugin is part of set Open University.


Screenshot #0


Tim at Lone Pine Koala Sanctuary
Tim Hunt (Lead maintainer)
Picture of Jamie Pratt
Jamie Pratt: Developer
Picture of Phil Butcher
Phil Butcher: Question type designer
Picture of Colin Chambers
Colin Chambers: Developer
Please login to view contributors details and/or to contact them

Comments RSS


  • Picture of Megan Atkins
    Thu, May 30, 2013, 6:34 PM
    Thanks TIm
  • Picture of Lynn Callier
    Wed, Jun 26, 2013, 10:20 PM
    will there be a version for 2.5 anytime soon
  • Picture of Phil Butcher
    Wed, Jun 26, 2013, 11:03 PM
    I think it's done but only in the last few days. It shouldn't be long before Tim makes it available.
  • Picture of ces moce
    Fri, Jul 12, 2013, 6:57 AM
    I would like to know if there is a way to put some html on the response, the idea is i would like to have the alphabet as an image and i would like to ask the user to drag the correct sound on the correct letter, i think it could be really usefull for a lot of people working in teaching languages... i would like to modify the plugin but don t know where to start
  • Tim at Lone Pine Koala Sanctuary
    Fri, Jul 12, 2013, 5:53 PM
    If you try to allow arbitrary HTML in the drag-boxes it makes it very difficult to get the JavaScript working on all browsers. We tried and failed, then we decided that we only needed draggable images, or text with and , so we stopped there.

    A work-around is to put the sound files in the question text, labelled A, B, C. Then have the student drag the letters A, B and C onto the diagram.

    If you would like to try to implement dragging arbitrary HTML, then that would be great, but if you do it, please test carefully on a wide range of browsers.
  • Germán and Temudgin
    Thu, Jul 18, 2013, 8:36 AM
    Hi Tim,
    I hope you don't mind that:

    This question type is now listed at

    and the documentation page was copied (from )

    to , in order to match the naming of other question types listed in Moodle Docs.
  • Tim at Lone Pine Koala Sanctuary
    Thu, Jul 18, 2013, 2:21 PM
    You are right that the page should have had the other name, so thank you for trying to tidy it up.

    However, copying the page, leaving the old one in place, is bad. The two copies are bound to end up inconsistent. The right thing to do is to move the old page to the new name. Also, that makes the old URL automatically redirect to the new one.

    I have just deleted the copy, and done the move.

    If you don't have permission to move pages, then send Helen Foster a message, and she will do it for you.
  • Picture of Chris Chapman
    Thu, Jul 25, 2013, 6:55 PM
    Hi, I am having a problem with BGIMAGE not displaying its true size on the Aardvark theme, it works in other themes, however I cant find anything in the theme files that would adjust the bgsize. I did increase the default values to :

    any body using this question type with aardvark?
  • Picture of Anna Krassa
    Wed, Aug 7, 2013, 4:45 PM
    What a great plugin! Thank you Tim and all. In a 2.5 system I have noticed that the background color in answers and groups are the same. So the answer is more than evident and it's the same with in the drag 'n' drop in image and text. sad Otherwise it's perfect tool. Oh, and perhaps some more documentation on how to would be nice. It took me some time to setup my first questions, while a newbie can make his first questions in no time! smile
  • Picture of Jamie Pratt
    Wed, Aug 7, 2013, 5:13 PM
    Hi Anna,

    The background color of all drop zones is different for different groups.

    Drag items can only be dragged to a drop zone of the same group. The colours help the student to identify the groups of the drop zones.

    Have you seen this documentation :

  • Picture of Anna Krassa
    Wed, Aug 7, 2013, 6:06 PM
    Obviously Jamie, groups was something I hadn't understood. Thank you very much for your reply here. This is a great, great plugin and I know a lot of people who where interested in it.
    Sorry for "spamming" here, I hadn't seen the documentation carefully. Verifying that image drag'n'drop and text drag'n'drop work perfectly in my 2.5!
  • Picture of Ruslan Motozen
    Thu, Sep 12, 2013, 2:07 PM
    Hi! I have a problem to install "Drag and drop onto image". When I try to install I get notification:
    "Plugin "mod_ddimageortext" is defective or outdated, can not continue, sorry.";
    Debug info: Missing version value in version.php
    Stack trace:
    line 457 of /lib/upgradelib.php: plugin_defective_exception thrown
    line 271 of /lib/upgradelib.php: call to upgrade_plugins_modules()
    line 1449 of /lib/upgradelib.php: call to upgrade_plugins()
    line 269 of /admin/index.php: call to upgrade_noncore()

    I'd appriciate you help to sort out this problem
  • Picture of Jamie Pratt
    Thu, Sep 12, 2013, 4:20 PM
    Hi Ruslan,

    It looks like the problem is that you have installed the question type plug in in the 'mod/' folder of your Moodle install rather than the 'question/type' folder and Moodle is telling you that what it assumes is your module code isn't as expected. Delete the directory mod/ddimageortext and reinstall the code in question/type/

    See the instructions at the bottom of this page for details :

    Please also note you will need to install the gapselect question type too as 'ddimageortext' reuses code from that question type :
  • Picture of Ruslan Motozen
    Thu, Sep 12, 2013, 8:42 PM
    Hi Jamie!

    Thank you very much for help. All works. Have a Good Day!
  • Just wondering . . .
    Thu, Nov 21, 2013, 10:09 AM
    Being unusual in our yearly timetable, we are looking at an upgrade to Moodle 2.6 for a February 2014 start.
    Is there any likelihood that the DnD questions may be ready for 2.6 by then?

Please login to post comments