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

moodleform addGroup separator does not work same as in previous version

    XMLWordPrintable

    Details

      Description

      While updating plugins used at moodle.org for moodle 3.5, I have discovered a regression in the Boost theme.

      I have a form code like this:

          public function definition() {
              
              $mform = $this->_form;
              
              $mform->addGroup([
                  $mform->createElement('checkbox', 'foo1', null, 'Foo1'),
                  $mform->createElement('checkbox', 'foo2', null, 'Foo2'),
                  $mform->createElement('checkbox', 'foo3', null, 'Foo3'),
              ], 'foos', 'Select foos', '<br>', false);
          }
      

      In Clean theme and in Boost 3.4, the checkbox elements are displayed as stacked vertically, using the <br> as the separator.

      In Boost 3.5 however, the separator seems to be ignored and the items are displayed next to each other.

      Steps to reproduce

      1. Go to a course and turn editing mode on
      2. Add a new SCORM activity
      3. Expand the Appearance section
      4. Click "Show more..." link
      5. Observe the checkbox options for the "Options (Prevented by some browsers)" field

      Expected behaviour: Options are supposed to be stacked vertically

      Actual behaviour: Options are displayed next to each other

        Attachments

          Activity

            People

            • Assignee:
              basbrands Bas Brands
              Reporter:
              mudrd8mz David Mudrák (@mudrd8mz)
              Peer reviewer:
              David Mudrák (@mudrd8mz)
              Integrator:
              Andrew Nicols
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Bas Brands, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/18