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

            basbrands Bas Brands
            mudrd8mz David Mudrák (@mudrd8mz)
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Andrew Lyons Andrew Lyons
            Mark Nelson Mark Nelson
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Huong Nguyen, Bas Brands, Mathew May, Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              17/May/18