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

Layout of multiple choice questions not well aligned

    XMLWordPrintable

Details

    Description

      It is most easy to reproduce this if you create a multiple choice question with

      • At least 13 choices
      • Have each choice start with a letter like D with a nice straight edge on the left.
      • Set the 'Number the choices?' option to 'a., b., ...' - or, a question with slighly fewer choices, and use one of the Roman numeral options.

      (See attached XML file, which has some example questions you can use to test this.)

      The left hand side of each of the choices are not lined up:

      So, currently we have (using the roman numeral case because it is more extreme)

      i. Some text which
         wraps
      ii. More text which
          wraps
      iii. And a third
           one.
      

      I wonder if we could achieve this:

      i.  Some text which
          wraps
      ii. More text which
          wraps
      iii. And a third
          one.
      

      So, what I am suggesting is that we align everything at a fixed indent which should make space for most numbers, but for very long numbers, they indent the first line. (Acutally, no I don't think that is possible, becuase the label may include block tags like <p> or <div>.)

      Basically, on the number, put a min-width: 2em, or something.

      Also, note we have quite a lot of history of regressions here. I will link other recent fixes. We need to make sure not to regress them.

      Attachments

        1. 1.5em letters.png
          1.5em letters.png
          9 kB
        2. 1.5 em no numbers.png
          1.5 em no numbers.png
          7 kB
        3. 1.5em Roman.png
          1.5em Roman.png
          9 kB
        4. image-2021-01-07-13-28-03-297.png
          image-2021-01-07-13-28-03-297.png
          265 kB
        5. letter.png
          letter.png
          324 kB
        6. letter2.png
          letter2.png
          326 kB
        7. MC question with wild choices.xml
          280 kB
        8. Multiple choice examples.xml
          10 kB
        9. roman.png
          roman.png
          331 kB
        10. Screenshot_1.jpg
          Screenshot_1.jpg
          96 kB
        11. Screenshot_2.jpg
          Screenshot_2.jpg
          92 kB
        12. screenshot-1.png
          screenshot-1.png
          28 kB

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              timhunt Tim Hunt
              Jun Pataleta Jun Pataleta
              Janelle Barcega Janelle Barcega
              Safat Shahin, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Jan/21

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h