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

Question bank: Category selector renders as nested form (invalid html)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7
    • 2.7.1
    • Questions
    • Internet Explorer 10 (probably also 11)
    • MOODLE_27_STABLE
    • MOODLE_27_STABLE
    • MDL-46163_category_selector_renders_as_nested_form
    • Hide

      Don't use IE

      Show
      Don't use IE
    • Easy
    • Hide
      1. In IE 10 (or 11?), open the developer console.
      2. Load the question bank, selecting a category that has some subcategories.
      3. This commit should fix the message about nested form tags.
      4. Changing categories should work correctly.
      5. Verify changing categries still works in another browser too.
      6. Repeat these steps but using the Edit quiz page ([Show] the question bank there if necessary).
      Show
      In IE 10 (or 11?), open the developer console. Load the question bank, selecting a category that has some subcategories. This commit should fix the message about nested form tags. Changing categories should work correctly. Verify changing categries still works in another browser too. Repeat these steps but using the Edit quiz page ( [Show] the question bank there if necessary).

    Description

      In question bank, the current code for the category selector uses a single_select object, which is a form consisting of a single <Select> tag. Because this selector is already inside of the <form action="edit.php">, that means we have a form within a form, which is invalid. MSIE complains about the invalid html on its console.

      To output valid HTML in a way that is consistent with the surrounding code, the linked commit replaces the single_select object with a html_writer::select.

      Attachments

        Issue Links

          Activity

            People

              raymor Ray Morris
              raymor Ray Morris
              Tim Hunt Tim Hunt
              Dan Poltawski Dan Poltawski
              Jason Fowler Jason Fowler
              Safat Shahin, Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Sabina Abellan, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Jul/14