I need some javascript help

Re: I need some javascript help

by Joseph Rézeau -
Number of replies: 2
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Jean-Michel (and Andrew). Just downloaded and tested the drag and drop matching question type from Jean-Michel's github. It's working fine. I am attaching a screenshot showing matching divers elements such as text, long text, image and audio. Basically it works quite smoothly and I only have a few minor remarks to make.

Tested on current Moodle 2.5 dev.

1.- When drag & dropping an element, just when the dragged element is on a target, the target box background turns dark blue, which makes the text underneath illegible (to me). That is not terribly important but I would suggest changing to a lighter color.

2.- When an element in the left column is a fairly long text, it is "squeezed" in its fixed width column. Does not look nice. This layout is made even more problematic because the quiz navigation block and question details block take up valuable horizontal space when taking the quiz.

3.- When reviewing a quiz with a drag and drop matching question, I do not see the need for displaying again the draggable elements to the right of the review screen.

4.- Something curious happens with the "flashplayer" for the audio elements. In review mode, the small flash player is replaced with the big one in the list of draggable elements (on the right)!

5.- Unfortunately we have the same problem as the Hot Potatoes match activity: if the list of elements is long and contains "large" elements such as long text, pictures, etc., it is not possible to drag an element further down than the current window, in order to reach a target sitting "out of view" to the bottom. The only way out of this blocked situation is to provisionally drop the element onto the lowest target visible at the bottom, then scroll down, pick the element, drag and drop it further down, etc. I have no idea if it's feasible to make the scroll bar automatically scroll down by holding a draggable element and "pushing" it down.

Nice job, I think all that needs to be done now is more thorough testing with as many diverse kinds of draggable elements as possible, not just plain text, and some finalizing of the display.

Joseph

 

Attachment 05-01-2013 17-43-05.jpg
In reply to Joseph Rézeau

Re: I need some javascript help

by Jean-Michel Védrine -

Hello Joseph,

Thanks a lot for your review. As you know I want to submit it to the Moodle plugin database, so I need fedback like this to improve this released version.

  1. My fault. Andrew wrote in a mail "Some of the colour choices I've used are just to demonstrate how it can be done in the stylesheets.".
    But work on issues in the tracker and also my work to prepare lessons took all my time, and I didn't had the time to look at the styles. Additionally people around me keep saying that my choice for colors sucks wink so maybe it would be better if you or somebody else propose colors ?
  2. I don't know what to do, but maybe this is clear sign that not all matching questions benefit from a drag and drop UI ?
  3. That seems sensible. But if some of the draggable elements were distractors this is a loss in information.
  4. Question for Andrew big grin
  5. I hate auto scrolling ! It seems to have a mind of its own and never do what I want, or stop when I want smile. Andrew will surely know if it's feasible or not, but maybe this is also the sign that not all match questions should be ddmatch ones ?

Please can all Moodle users interested in ddmatch question type keep testing this version. Thanks.

 

In reply to Jean-Michel Védrine

Re: I need some javascript help

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

1: I'm also not great a choosing colours - I was passing the buck I'm afraid ;)

2: This one is difficult. At present, the question side is allowed 25% of space, and the answer 75%. I'm not a style guru by any means, but it will be very difficult to please everyone here. If you have any suggestions on an improvement, they'd be good to hear.

3: This could probably be turned off - I'm not familiar enough with the quiz engine to know about this side of things really, but it should be pretty easy with CSS.

4: If you have an example of this then I can have a play. As I say, I'm not massively familiar with the question engine or quizzes in general.

5: I had a play with auto-scrolling, but it seems that if we constrain the drag/drop (as we need to do so), then the scrolling breaks. That said, I've just had an alternative idea which I'm going ot have a play with.

Andrew

4: