marcusgreen / moodle-qtype_gapfill

Fill in the blanks question type with very easy to learn syntax
6 stars 20 forks source link

Moodle blocks under question #76

Closed sfleussu closed 3 years ago

sfleussu commented 3 years ago

Hello Marcus,

The Moodle blocks appear under the question when using gapfill question type.

To reproduce

  1. On Moodle 3.10 (and 3.11), install first the 2.10 version of qtype_gapfill. Verify that the display is correct when creating a unique question in a new test (as shown on first image) :
  2. Upgrade to qtype_gapfill 2.131 and verify that the display is now incorrect in the previous test (as shown on second image)
  3. This can be reproduce on Boost Theme as well as Adaptable theme (and the same occurs with a new Moodle 3.10 or 3.11 installation). Same on a 1920x1080 screen.

Screen shots

In version 2.10 qtype_gapfill (2 10)

In version 2.131 qtype_gapfill (2 131)

Expected behavior

In new version of qtype_gapfill, the display should be the same as in version 2.10 (for blocks on the right).

Desktop :

Remarks

The display is similar to issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/62

marcusgreen commented 3 years ago

Thank you Serge, I will investigate. Excellent detailed report. I asked for you to post here because it is hard to track the issues on the moodle org plugins site. The error will be somewhere in the renderer.php file and is probably related to a missing closing div. Could be a delay before I get to look at in detail but I will keep you informed.

marcusgreen commented 3 years ago

I have just reproduced at the first attempt. That slightly surprised me as I assumed it was a slightly edge condition as I am constantly creating quizzes and playing with it. I spent a chunk of time this last weekend creating new questions and experimenting with it. I am trying to think how I could create an automated test for it (once I work out the source of the problem). Anyway I will spend some time on it as soon as I can.

marcusgreen commented 3 years ago

I have partly confirmed my suspicions, if I check the options after text checkbox the issue goes away. I will work on a fix and a test to it both solves the problem and ensures it does not come back in a future version.

marcusgreen commented 3 years ago

Spurious div ... https://github.com/marcusgreen/moodle-qtype_gapfill/blob/1d53336a71ac1b518ea79a7a7b617bcf1509b8c1/renderer.php#L100

marcusgreen commented 3 years ago

I have done some more work on this and I now have what I believe is a fix and an automated test should ensure this does not happen with future code changes. Will update when I have done some more work.

marcusgreen commented 3 years ago

I did some additional testing (including with the mobile app), have run all the automated tests, including the one that specifically tests for this issue and released a new version to the plugins database Gapfill 2.132 https://moodle.org/plugins/qtype_gapfill/2.132/24837 This matches this tag in Github. https://github.com/marcusgreen/moodle-qtype_gapfill/releases/tag/v2.132 Please test and confirm it addresses the issue for you.

sfleussu commented 3 years ago

Sorry for answer delay. Thanks for the fix. No more issue for me.