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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.7.1
    • Component/s: Questions
    • Labels:
    • Environment:
      Internet Explorer 10 (probably also 11)
    • Testing Instructions:
      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).
    • Workaround:
      Hide

      Don't use IE

      Show
      Don't use IE
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-46163_category_selector_renders_as_nested_form

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/Jul/14