Question types: Drag and drop into text

qtype_ddwtos
Maintained by Tim at Lone Pine Koala Sanctuary Tim Hunt, Picture of Jamie Pratt Jamie Pratt, at the OU (Perry building) Mahmoud Kassaei, Picture of Phil Butcher Phil Butcher
A drag and drop question type where missing words have to be dragged into gaps in a paragraph of text.
763 sites
156 downloads
47 fans

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.

Sets

This plugin is part of set Open University.

Screenshots

Screenshot #0

Contributors

Tim at Lone Pine Koala Sanctuary
Tim Hunt (Lead maintainer)
Picture of Jamie Pratt
Jamie Pratt: Developer
at the OU (Perry building)
Mahmoud Kassaei: 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

Show comments
  • Tim at Lone Pine Koala Sanctuary
    Wed, 16 Sep 2015, 9:12 PM
    Sorry, no.
  • Picture of Matt Wood
    Mon, 16 Nov 2015, 6:54 PM
    Hi, I was wondering is it possible to have 'blank' answers? I'm trying to create a question where the test taker has to select an appropriate column (in a table) and enter a value in the row. However the other column would need to be blank. Currently using the other question types the answer box would appear in the column, giving away the answer to that part of the question.
  • Tim at Lone Pine Koala Sanctuary
    Thu, 19 Nov 2015, 2:51 AM
    Sorry, no.

    However, you can make this sort of question using drag-drop markers, and possibly the gapfill question type.
  • Picture of William Kane
    Fri, 18 Dec 2015, 2:41 AM
    In the screenshot, it shows a example of math using exponents. How was this achieved?
  • Tim at Lone Pine Koala Sanctuary
    Fri, 18 Dec 2015, 3:22 AM
    x2
  • Tim at Lone Pine Koala Sanctuary
    Fri, 18 Dec 2015, 3:22 AM
    OK, that was unhelpful. x<sup>2</sup>
  • Picture of Phil Butcher
    Fri, 18 Dec 2015, 3:27 AM
    Full documentation is here http://www.open.edu/openlearnworks/mod/oucontent/view.php?id=52747&section=2.3.1 (you can follow the link at the top of the page to get here too).
  • Picture of Sonja Sperber
    Thu, 18 Feb 2016, 8:52 PM
    hi,


    we have a puzzling problem concerned with the question type
    „Drag and drop into text"

    Moodle version: 2.9.1+ (Build: 20150716)

    our situation is, we develop „Drag and drop into text" questions
    in a particular course. Out of that course we can successfully export
    questions of that type. In our case we made a backup of that
    course. We are able to restore the course on another server (same Moodle Version)
    with the .mbz-file. If we however try to export questions
    from that newly created course (other Moodle instance), the export fails.

    error message:

    Can not find data record in database table question_ddwtos.


    debugger:


    Debug info: SELECT * FROM {question_ddwtos} WHERE questionid = ?
    [array (
    0 => '93',
    )]
    Error code: invalidrecord
    Stack trace:
    line 1453 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
    line 1429 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
    line 109 of /question/type/gapselect/questiontypebase.php: call to moodle_database->get_record()
    line 89 of /question/editlib.php: call to qtype_gapselect_base->get_question_options()
    line 767 of /question/format.php: call to get_questions_category()
    line 1767 of /lib/questionlib.php: call to qformat_default->exportprocess()
    line 4361 of /lib/filelib.php: call to question_pluginfile()
    line 37 of /pluginfile.php: call to file_pluginfile()


    So I assume, that the backup prozess creates an .mbz-file that does not
    include the SQL-Statement which inserts the records corresponding to that
    type of question in the table mdl_question_ddwtos (I think they take care
    of prefixes).

    Is that a bug in Moodle ? How can we create fully functioning course on other
    Moodle instances, i.e. course from which are able to export that (all) question type

    Are there other dependencies ?

    Best,

    Sonja
  • Picture of Alexandre Trevisani
    Tue, 5 Apr 2016, 11:51 PM
    Matt Wood.
    In fact I've managed to include "blank answers" assigning the html code &nbsp to one of the items. It renders a blank square that can be dragged and dropped.
  • Picture of Marco Caresia
    Mon, 7 Nov 2016, 6:25 PM
    Hi! The question type is great!
    Is there an upgrade to 3+ foreseen?
    Thank you!
    --
    MC
  • Tim at Lone Pine Koala Sanctuary
    Mon, 7 Nov 2016, 7:18 PM
    In Moodle 3.0+ this is a standard question type that comes as part of the main install.
  • Picture of Achim Eichhorn
    Wed, 13 Jun 2018, 12:17 PM
    For mathematical and/or technical questions it would be very desirable if we could use LATeX code within the drag boxes. MathJAX works very well with Moodle, but in the draxboxes the code is not interpreted by MathJAX. I suppose, after Javascript has created the dragboxes, would the MathJAX Hub have to be called again?

    If we want to implement this behavior into the "drag and drop text questions" ourselves, where in the source code would be the appropriate place?

    I could imagine to program my own question type "Drag Drop LATeX", which inherits from the existing D'n'D classes, but implements Javascript for MathJAX.

    I am very grateful for any information.

    Yours sincerely Achim
  • Picture of Achim Eichhorn
    Wed, 13 Jun 2018, 3:37 PM
    In addition to my former comment. When adding following JS to the additional HTML Header Section: the LaTeX in my dragboxes is interpreted. And I can drag'n'drop the boxes. BUT, the dimensions of the dragboxes are those of the uninterpreted content!
    I think there is a race-condition between D'n'D javascript and MathJAX javascript.

    I had a glance at ddwtos.js. There is a method "initializer" which calls "set_padding_sizes_all()".
    My guess is, that, if LaTeX would be rendered before this method is called, everything should work fine.

    Could anyone assist me here? I think this could be helpful for everyone developing mathematical/technical content!

    Yours sincerly Achim
  • Picture of Achim Eichhorn
    Wed, 13 Jun 2018, 3:40 PM
    Sorry, my jacascript in the former comment was removed. I called within window.onload the typesetting for mathjax hub.
  • Tim at Lone Pine Koala Sanctuary
    Wed, 13 Jun 2018, 8:15 PM
    Right, the reason maths in drag items was disabled was because of that race condition, which we could not find a fix for at the time. It must be possible to fix, but someone has to work out how. It would certainly be good to allow maths etc. in drag items.
1 2 3 4 5 6

Commenting temporarily disabled