Drag and drop markers
Maintained by
Tim Hunt, Jamie Pratt, Phil Butcher
The student can drag markers to indicate key features on an image.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
I had problems exporting as moodle xml and then importing this particular question type, I dont know if this is the place to discuss this but as it turned out I had a fatal error about a non-existing method for reinstatiating the background image from xml.
It's the "import_files_to_draft_file_area()"call on $this in import_from_xml() method in the questiontype.php file, i changed it to a import_files_as_draft call on $format like so:
//$question->bgimage = $this->import_files_to_draft_file_area($format, $filexml);
$question->bgimage = $format->import_files_as_draft($filexml);
I found that statement in ddimageortext question type and it appears to be functional now? I did the import again and no errors and the question I was importing looked ok to me. I'm on moodle 2.5.3.
Regards Jeroen
It seems like the drag-drop question is using absolute coordinates?
After more testing we now think it has to do with the responsive theme we are using. We are running Moodle 2.5 and using the bootstrap "Clean" theme
http://docs.moodle.org/dev/Clean_theme
(http://www.somerandomthoughts.com/blog/2013/05/08/moodle-2-5-and-the-bootstrap-based-theme-clean/)
This is a responsive theme and - depending on the size of the browser - adjusts the size of the picture. That seems to also be the cause of the problems with the iPad.
Any thoughts on if this can be addressed in the drag-drop question code?
Thanks,
Kb
The MacBook Pro has a 17-inch display with a default resolution of 1680 x 1050. Sadly my eyes are getting a bit far sighted and I changed the resolution to 1280 x 1024 for that reason. However, if I left it at 1280 x 1024 (normal, non-stretched), a black band appears on each side of the display. Using the “stretched” version of the resolution allows me to have the image cover the entire screen and eliminate the bands.
Testing it at work this morning on my iMac (27" screen). I ran the quiz at three resolutions:
My normal display (1620x1080) works and looks fine: http://s1330.photobucket.com/user/barhydtk/media/1620x1080_zps928dbf33.jpg.html
Changing the display to 1280x1024 works and looks fine: http://s1330.photobucket.com/user/barhydtk/media/1280x1024_zpsbdce808e.jpg.html
But changing the display to 1280x960 (stretched) does not work correctly and the drop zones change: http://s1330.photobucket.com/user/barhydtk/media/1280x960stretched_zps8442d057.jpg.html
I'm going to talk to our sr. web developer to get her take on this. Let me know what you think.
Thanks,
Kb
It looks like you may have found a incosistency in the YUI functions that we use to calculate an x, y position on the screen from a pixel location and vice versa. YUI should be dealing with differences between different hardware set ups.
"Stretched" to me means that your display is stretching the pixels output by your graphic card in order to fill the whole screen. If that is what is happening this would seem to be an odd setting for your monitor which will result in a less crisp display but then I would think we would see that on your second screen shot and it does not look "stretched" in this sense.
Do you see the same problem in the standard theme? What theme are you using?
I set up the quiz as such: http://s1330.photobucket.com/user/barhydtk/media/dragdropquizsettings_zps2340488d.jpg.html
When I test the quiz on the computer I created it on it works perfectly.
However, I came home and tested it on my Macbook Pro. It has a 17" screen, and the display is set to 1280x1024 (stretched).
When I tested the quiz it did not work as well, and the drop zones seemed to be off: http://s1330.photobucket.com/user/barhydtk/media/dragdropquizonMBProStretched_zps27a9cf17.jpg.html
Any thoughts?
Many thanks,
Kb
"It does not work" is not a useful bug report. What goes wrong? Are there any error messages?
But I want to ask you one last question,
Where and how the call is made (the link) file 'crosshairs.gif' contained in the 'pix'.
thank you again