Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85510

Questions: the clearfixes added in MDL-84708 to address floated images is causing spacing issues in questions w/o images

    • MOODLE_405_STABLE
    • MDL-85510-405
    • MDL-85510-500
    • MDL-85510-master
    • Hide

      Case 1: Float Element Present in Question Text and General Feedback

      Setup:

      1. Create any Multiple Choice or True/False question.
      2. Attach an image to the Question Text.
      3. Set the image alignment to left or right (i.e., apply float: left; or float: right;).
      4. Preview the question.
      5. Submit the answer to view the General Feedback.

      Expected Result:

      • The answer box should appear at the bottom of the content.
      • It should not be overlapped by any floating elements (e.g., images).

      Case 2: No Float Element in Question Text or General Feedback

      Setup:

      1. Create any Multiple Choice or True/False question.
      2. Do not include any floated elements (e.g., floated images) in either the Question Text or General Feedback.
      3. Preview the question.
      4. Submit the answer to view the General Feedback.

      Expected Result:

      • The layout should display normally, without any unexpected empty space or layout shifts.
      Show
      Case 1: Float Element Present in Question Text and General Feedback Setup: Create any Multiple Choice or True/False question. Attach an image to the Question Text. Set the image alignment to left or right (i.e., apply float: left; or float: right; ). Preview the question. Submit the answer to view the General Feedback. Expected Result: The answer box should appear at the bottom of the content. It should not be overlapped by any floating elements (e.g., images). Case 2: No Float Element in Question Text or General Feedback Setup: Create any Multiple Choice or True/False question. Do not include any floated elements (e.g., floated images) in either the Question Text or General Feedback. Preview the question. Submit the answer to view the General Feedback. Expected Result: The layout should display normally, without any unexpected empty space or layout shifts.
    • Hide

      Code verified against automated checks.

      Checked MDL-85510 using repository: https://github.com/NashTechOpenUniversity/moodle

      More information about this report

      Built on: Wed May 21 10:28:38 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-85510 using repository: https://github.com/NashTechOpenUniversity/moodle MOODLE_405_STABLE (0 errors / 0 warnings) [branch: MDL-85510-405 | CI Job ] MOODLE_500_STABLE (0 errors / 0 warnings) [branch: MDL-85510-500 | CI Job ] main (0 errors / 0 warnings) [branch: MDL-85510-master | CI Job ] More information about this report Built on: Wed May 21 10:28:38 UTC 2025

      Before we applied the 4.5.4+ weekly release that included MDL-84708, our multiple choice questions looked like this:

      Afterwards, they look like this:

      The questions began displaying correctly again after specifically removing the "clearfix" changes to:

      • question/type/questionbase.php
      • question/type/rendererbase.php

      The patch I used is here: 

      MDL-85510.patch

        1. MDL-85510.patch
          2 kB
          Aaron Bean
        2. chrome_HpbG1LiCys.png
          3 kB
          Aaron Bean
        3. chrome_kjK2UVWtup.png
          4 kB
          Aaron Bean

            vuvanhieu143 Hieu Vu
            aaronbean Aaron Bean
            Votes:
            11 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.