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

Horrible mess with formslib and generated ids

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.14, 2.0.5, 2.1.2
    • Fix Version/s: 2.1.4, 2.2.1
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      Hide

      1. Test the edit question forms to verify that the problems described in the issue Description are gone.

      2. Test a variety of other forms in Moodle, to verify that they are not broken.

      3. Run the unit tests in lib/simpletest/testformslib.php

      Show
      1. Test the edit question forms to verify that the problems described in the issue Description are gone. 2. Test a variety of other forms in Moodle, to verify that they are not broken. 3. Run the unit tests in lib/simpletest/testformslib.php
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-30168_tim2

      Description

      To see the symptoms of the problem, try this:

      1. Go to the question bank, and create a match question.
      2. Scroll down to the Hints section of the form.
      3. Click on the label "Clear incorrect responses" next to Hint 2.
      4. Observe that the checkbox in Hint 1 toggles, not the one in Hint 2. (I am testing this on Firefox, in case it matters.)

      For comparison, create a numerical question. Note that in the repeated 'Answers' section of the form, note that clicking on all the labels work as inspected. A bit of poking around with Firebug should let you see that the problem is to do with generated ids.

      Looking in git history, this seems to have been a problem ever since we started using HTML quickforms.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jan/12