Moodle plugins directory: Drag-and-Drop Matching | Moodle.org
Drag-and-Drop Matching
What Drag-and-Drop Matching Offers!
Matching questions in Moodle are created by supplying several questions and their correct answers. Enhance the matching questions of the quiz by adding a drag-and-drop interface. Hence promotion a fun and relaxing learning environment.
For further details on this plugin kindly read the documentation available : https://dualcube.com/docs/drag-and-drop-matching/
-
Automatic Answer Space Generator - No need to break a sweat as a predefined space is created whenever the matching quiz appears.
-
Mutiple Option as Answers - Students need to simply select the correct answer from the option list. This helps create a better learning environment and saves time.
-
Enhanced user interface - The drag-and-drop interface is extremely simple to use, as students simply 'drag' and 'drop' the correct answer.
-
Automatic Grading - After responding to the quiz, the student will automatically receive a grade based on their input.
Try out this easy to use solution if you want to make learing activities fun.
I had an error when trying to duplicate a quiz : error/error_qtype_ddmatch_subquestion_missing_in_db
This was thrown by question/type/ddmatch/backup/moodle2/restore_qtype_ddmatch_plugin.class.php function process_match($data)
After investigation, $data->questiontext value was something like $@PAGEVIEWBYID*12345@$ instead of http://mywebsite/mod/page/view.php?id=12345 in the database which explain why the test if(!isset($this->questionsubcache[$data->questiontext][$data->answertext])) failed
I patched it like that :
if (!isset($this->questionsubcache[$data->questiontext][$data->answertext])) {
$pattern="#\\$\\@PAGEVIEWBYID\\*([0-9]*)\\@\\$#";
$replacement="https://mywebsite/mod/page/view.php?id=$1";
$data->questiontext=preg_replace($pattern, $replacement, $data->questiontext);
$data->answertext=preg_replace($pattern, $replacement, $data->answertext);
if (!isset($this->questionsubcache[$data->questiontext][$data->answertext])) {
throw new restore_step_exception('error_qtype_ddmatch_subquestion_missing_in_db', $data);
}
}
This patch seems to work, but i don't know why my $data contains bad data :s. Have you any idea of the origin of this "value" $@PAGEVIEWBYID*12345@$ ?
If i have time i will try to investigate more, but it was also looking like it goes through all questions of all quiz in the course to duplicate only one quiz with two question (which was not looking efficient when there is a lot of small quiz in the course :s)
These bad data were created by a backup/restore or duplicate problem.
@PAGEVIEWBYID and a lot of other expressions surrounded with @ are used during backup/restore
Most probably the faulty questions come from another Moodle course or from a restored course, and of course these expressions should have been decoded during restore.
So i don't understand why these data were left undecoded in the question text.
I have problem with drag and drop matching plugin.
If my answer already placed in front of question and I submit the quiz in this case it showing message "Your answer is incorrect".
Ex. My question have 2 options
If by default question populate like this
Question1 = Answer1
Question2 = Answer2
After submission it is always showing "Your answer is incorrect." while my answer is correct.
Thanks for getting in touch with us. Unless you drag and drop an answer, it won't take an answer by itself.
So, you have to drag the right or wrong answer and drop it at the dropping field so that it recognizes what you have selected.
Thank you.
We are sorry for the delayed response. The screenshots are from this plugin: https://moodle.org/plugins/qtype_ddmatch. Thank you.
From BeingOptimist team.
Otherwise, the installation loops
It is GDPR compliant, has security fixes, some Behat and phpunit tests.