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

html breaking standards in m27/admin/tool/behat/renderer.php

    XMLWordPrintable

Details

    • MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MDL-45156_master
    • Hide

      Test 1

      • Go to admin/tool/behat/index.php
      • Check that you can properly see the info box
      • Check that the HTML is not breaking

      Test 2

      • All behat tests should pass
      Show
      Test 1 Go to admin/tool/behat/index.php Check that you can properly see the info box Check that the HTML is not breaking Test 2 All behat tests should pass

    Description

      The code:

              // List of steps.
              $html .= $this->output->box_start();
              $html .= html_writer::tag('h1', get_string('infoheading', 'tool_behat'));
              $html .= html_writer::tag('div', get_string('aim', 'tool_behat'));
              $html .= html_writer::empty_tag('div');
              $html .= html_writer::empty_tag('ul');
              $html .= html_writer::empty_tag('li');
              $html .= implode(html_writer::end_tag('li') . html_writer::empty_tag('li'), $infos);
              $html .= html_writer::end_tag('li');
              $html .= html_writer::end_tag('ul');
              $html .= html_writer::end_tag('div');
              $html .= $this->output->box_end();
      

      in m27/admin/tool/behat/renderer.php generates an invalid html.

      It should be changed, for instance, to:

              // List of steps.
              $html .= $this->output->box_start();
              $html .= html_writer::tag('h1', get_string('infoheading', 'tool_behat'));
              $html .= html_writer::tag('div', get_string('aim', 'tool_behat'));
              $html .= html_writer::start_tag('div');
              $html .= html_writer::start_tag('ul');
              foreach ($infos as $info) {
                  $html .= html_writer::tag('li', $info);
              }
              $html .= html_writer::end_tag('ul');
              $html .= html_writer::end_tag('div');
              $html .= $this->output->box_end();
      

      Attachments

        Activity

          People

            dmonllao David Monllaó
            daniss Daniele Cordella
            Dan Poltawski Dan Poltawski
            Marina Glancy Marina Glancy
            Sam Hemelryk Sam Hemelryk
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/May/14