Drag-and-Drop/Moodle 3.9 not working on some iOS devices

Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Daniel Schneider -
Number of replies: 8

I observed issues with drag-and-drop question types in Moodle quizzes also in older Moodle versions, but some seem to have been fixed (for example MDL-62239). 

Now on Moodle 3.9, I compared identical courses/quizzes with Moodle 3.5.1 on the same iOS devices, and drag-and-drop clearly works much better in 3.5.1. There I could use these questions even on a small display (iPhone X). In 3.9, the same questions don't work at all on the same iPhone X. On iPads, it's mixed, like all the questions work on a iPad Pro 12.9" 3rd generation, but on a iPad Pro 11", they only work when the display is held in portrait, not in landscape.

 The latter case is very weird, is Moodle 3.9 using screen sizes (resolutions) to determine if running on a mobile or desktop browser? That seems the only reason to me why drag-and-drop works in portrait and not in landscape (in both cases the page doesn't fit the height of the display, so it doesn't seem to be directly connected to a page scrolling conflict).

Anybody observed something similar? I can post testing links.

Average of ratings: -
In reply to Daniel Schneider

Re: Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Tim Hunt -
Core developers колдонуучунун сүрөтү Documentation writers колдонуучунун сүрөтү Particularly helpful Moodlers колдонуучунун сүрөтү Peer reviewers колдонуучунун сүрөтү Plugin developers колдонуучунун сүрөтү
Well, there were chagnes to drag-drop questions - with the intention to make them work *better* on small screens. https://docs.moodle.org/dev/Moodle_3.9_release_notes#Quiz_and_questions

Your desciption of the problem you percieve is not very precise. It might be that it is working as intended, or it might be there is a bug that no-one else has detected. What acutally is happening?
In reply to Tim Hunt

Re: Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Daniel Schneider -

You're right that my description wasn't very precise. I guess a video would be the clearest way how to illustrate it, but I'll try to first describe it better:

There are several symptoms: Either I cannot select and move drag-and-drop items at all. Nothing happens when I tap and hold the element. In the case of the 11" iPad, this is the case in landscape orientation. When I rotate the display to portrait, I can just tap and hold the element and I can drag it. When I successfully drop it on one of the target positions and rotate the display back to landscape, I can move this element away from the target position, but the other elements, which are still in the origin positions, still don't react at all when tapping and holding them. When the same question is displayed on an iPhone X, the items don't react at all regardless of display orientation. (This happens with a drag and drop into text question, with a Drag and drop onto image question and with a Drag and drop markers question).

In the Drag-and-Drop Matching question type, items can always be selected and moved, but the page (which is longer than the display height) scrolls as well when trying to move the item vertically. So you can basically only move items horizontally.

Btw., being a software developer myself, I am quite confident that I was able to rule out that "it is working as intended", especially as I mentioned that I compared the exact same questions on Moodle 3.5.1 and 3.9 and that it behaves differently on different devices or even with different display orientations (portrait/landscape). The behavior is definitely not logical at all, so it obviously must be a bug.
In reply to Daniel Schneider

Re: Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Tim Hunt -
Core developers колдонуучунун сүрөтү Documentation writers колдонуучунун сүрөтү Particularly helpful Moodlers колдонуучунун сүрөтү Peer reviewers колдонуучунун сүрөтү Plugin developers колдонуучунун сүрөтү
Thanks for the more detailed explanation:

First, an observation: it probably will not depend on the particular device, it probably just depends on which version of iOS and/or Safari is being used. And, things that behave differently depending on orientation are really weird. As yet, I have no clue why that would be.

"I cannot select and move drag-and-drop items at all" this is interesting, because although some things were changed, I thought we had not changed the lowest level of the code, which just makes stuff drag around the screen.

OK, I can reproduce this on my iPhone at qa.moodledemo.net. It worked perfectly in portrait mode, then I rotated the screen. sad Bug reported as MDL-69104. Will look into that on Monday I guess.

Note, the way you debug HTML/JavaScript on iOS is to plug into a Mac computer with a USB cable, then you can use Developer tools in Safari on the desktop to debug what is happening in Safari on the phone.

Drag-and-drop matching is an add-on question type. The other three are standard. That is probably why there is a difference there.
Average of ratings:Useful (1)
In reply to Daniel Schneider

Re: Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Edwin Lynd -

I have problem too on this. Previously it worked well. and now my version is 3.9.1

the items showing as very small dots on screen when in editing view, while when previewing it, the dragged items  are shrunk into small squares, on PC.

 when editing

 when answering

In reply to Edwin Lynd

Re: Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Tim Hunt -
Core developers колдонуучунун сүрөтү Documentation writers колдонуучунун сүрөтү Particularly helpful Moodlers колдонуучунун сүрөтү Peer reviewers колдонуучунун сүрөтү Plugin developers колдонуучунун сүрөтү
That bug should have been fixed in Moodle 3.9.1 (having been broken in 3.9). Can you give details of how to reproduce the problem?
Average of ratings:Useful (1)
In reply to Tim Hunt

Re: Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Edwin Lynd -

Moodle 3.9.1

either in question bank or a quiz, it does not work.

In reply to Edwin Lynd

Re: Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Joseph Rézeau -
Core developers колдонуучунун сүрөтү Particularly helpful Moodlers колдонуучунун сүрөтү Plugin developers колдонуучунун сүрөтү Testers колдонуучунун сүрөтү Translators колдонуучунун сүрөтү
Hi Edwin,
You did not reply to Tim's request "Can you give details of how to reproduce the problem?".
You must realize that it is impossible to help you if you don't provide step-by-step instructions to reproduce your problem.wink
Average of ratings:Useful (1)
In reply to Joseph Rézeau

Re: Drag-and-Drop/Moodle 3.9 not working on some iOS devices

by Edwin Lynd -

go to question bank→ create a question of type "Drag and drop onto image", using either jpg or png →save and continue to edit→  the draggable pictures not showing properly but some small dots, which are hard to be found but can be drag go adjust their coodination. → save and review → it shows normal. but when drag the items into their target zones, they shrink small as small squares.

Previously it was normal when I use Moodle 3.8 earlier, don't know what caused the change.