Drag 'n' drop in text -- fields too small

Drag 'n' drop in text -- fields too small

Nosūtīja David Dunn
Atbilžu skaits: 14
Moodle2.7+ (Build: 20140703)


qtype_ddwtos 0.1.2  1.4 for Moodle 2.6+



A student highlighted the following issue today. The dragged items do not appear to "stick" in the blank fields. I have reproduced this error on two other machines (using FF and Chrome). However, it seems that the blank fields have shrunk in height, and that the landed text is not correctly displayed.

The first screenshot below shows clearly the shrunken text field.

Drag and drop shrunken text field

Second screenshot shows text highlighted, although not legible.


Third and final screenshot shows results. The quiz has correclt processed the answers, meaning that they did land correctly. They are just not displayed correctly.


I have cleared all caches. Debugging gave no info.

Any other suggestions?


Vidējais novērtējums: -
Atbildot uz David Dunn

Re: Drag 'n' drop in text -- fields too small

Nosūtīja Marcus Green
Core developers attēls Particularly helpful Moodlers attēls Plugin developers attēls Testers attēls

What theme are you using?

Atbildot uz Marcus Green

Re: Drag 'n' drop in text -- fields too small

Nosūtīja David Dunn
Elegance 2.7.1.00 (Build: 2014082100)
Atbildot uz David Dunn

Re: Drag 'n' drop in text -- fields too small

Nosūtīja Tim Hunt
Core developers attēls Documentation writers attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls

Can you try temporarily switching to a different theme to see if that solves this issue? (We don't see this problem with the OU's own theme.) That will help narrow down the problem.

Then it is probably a matter of poking around with Firefox or Chrome developer tools to see what CSS seems to be causing the problem.

Atbildot uz Tim Hunt

Re: Drag 'n' drop in text -- fields too small

Nosūtīja David Dunn

Hi Tim,

Swtiching to theme Essential solved the issue of the shrunken text fields. However, I see a new issue now: When dragging the item, it is displayed way below the cursor -- see screenshot below.


I think I will have to re-do this quiz question as a temporary solution because students are working through a long series of conditional access-ed activities and I don't want to hold them up.

I will have a look at the Firebug info tomorrow, but in the meantime, switch back to our regular theme, Elegance.


By the way, Tim, I'd like to thank you and your team for offering these great plugins for the greater good. We really value them in our teaching programs at HZ University of Applied Sciences in the Netherlands.


David

Atbildot uz David Dunn

Re: Drag 'n' drop in text -- fields too small

Nosūtīja Tim Hunt
Core developers attēls Documentation writers attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls
Atbildot uz Tim Hunt

Re: Drag 'n' drop in text -- fields too small

Nosūtīja Gareth J Barnard
Core developers attēls Particularly helpful Moodlers attēls Plugin developers attēls

Hi David,

In order for me to help you, please could you supply:

  • Version information about Essential used.
  • Link and version to the specific OU Quiz question type so that I can download and install it.
  • If possible a course backup containing the quiz with the question so that a) Its quicker and b) I replicate exactly.

Thanks,

Gareth

Essential theme maintainer / developer / dogs body.

Atbildot uz Gareth J Barnard

Re: Drag 'n' drop in text -- fields too small

Nosūtīja David Dunn

Hi Gareth,

There is some confusion about which theme is at issue here. As I posted above, it concerns Elegance (0.1.2, Release 2.7.1.00 (Build: 2014082100)).

I repeat that switching to Essential (release 2.7.9.1 (Build: 2014111001)) does not reproduce the error; the text boxes are the right size, and the dropped-in text is completely visible.

Let me know if you are also able/willing to deal with an Elegance issue, and I will send you the stuff you requested.

Atbildot uz David Dunn

Re: Drag 'n' drop in text -- fields too small

Nosūtīja David Dunn

I see now that I have also got confused. The question type is Gapfill with the DragDrop option.

A quick check with Chrome's Inspect Element tool shows that the dropbox has the following:

<input type="text" name="q23176:1_p1" value="vital role" id="q23176:1_p1" size="10" class="droppable  ui-droppable" style="height: 1.2em;">


Changing the CSS height seems to fix the issue.

element.style {
  1. height1.6em;
  2. background-colorwhite;
}


I've made an edit in question/type/gapfill/renderer.php, line 120, to height: 1.6em;

The dropbox now displays correctly: high enough and displays the dropped text clearly.
Atbildot uz David Dunn

Re: Drag 'n' drop in text -- fields too small

Nosūtīja Gareth J Barnard
Core developers attēls Particularly helpful Moodlers attēls Plugin developers attēls

Hi David,

Sorry was confused by: https://moodle.org/mod/forum/discuss.php?d=275041 as said it was an Essential issue too.

So... all is working now?

Gareth

Atbildot uz David Dunn

Re: Drag 'n' drop in text -- fields too small

Nosūtīja Victor Santos

Hello David,

I am having the same problems, I am using the theme "elegance".

Can you tell me wich css file you changed?

Thank you.

Atbildot uz Victor Santos

Re: Drag 'n' drop in text -- fields too small

Nosūtīja David Dunn

Hi Victor,

The file I edited is in my post above: 

question/type/gapfill/renderer.php, line 120, to height: 1.6em;


I hope it works for you too!


- David

Atbildot uz David Dunn

Re: Drag 'n' drop in text -- fields too small

Nosūtīja Victor Santos

Hi David,

For some reason it didn't change nothing. Still with the same issue bēdīgs