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

disabledIf does not work for advcheckbox

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.11, 2.0.5, 2.1.2, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      Hide

      0) Note: Due to the imminent minor and major releases this has to be tested under ALL branches. Important!

      1) Test that other fields can depend on an advchechbox:

      Verify that the following pattern of enabled/disabled text fields is shown (with + meaning "enabled" and - meaning "greyed out"):

      When checkbox is ticked: + - + - +
      When checkbox is not ticked: - + - + -

      2) Test that an advcheckbox can depend on other elements:

      • Go the the question bank and ask to create a new calculatedmulti question. Verify that no warnings like "Warning: Missing argument 1 for HTML_QuickForm_advcheckbox::getPrivateName()" are shown.
      Show
      0) Note: Due to the imminent minor and major releases this has to be tested under ALL branches. Important! 1) Test that other fields can depend on an advchechbox: Place testcheckbox.php (as attached) into your main Moodle directory. Open the page in a web browser, as http://....pathtoyourmoodle.../testcheckbox.php Tick and untick the checkbox on this page. Verify that the following pattern of enabled/disabled text fields is shown (with + meaning "enabled" and - meaning "greyed out"): When checkbox is ticked: + - + - + When checkbox is not ticked: - + - + - 2) Test that an advcheckbox can depend on other elements: Go the the question bank and ask to create a new calculatedmulti question. Verify that no warnings like "Warning: Missing argument 1 for HTML_QuickForm_advcheckbox::getPrivateName()" are shown.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When creating a form element that uses disabledIf that checks against a advcheckbox type, the element always remains disabled. This is related to MDL-18522

        Attachments

        1. checkbox19.patch
          0.5 kB
        2. checkboxtest_extra.php
          2 kB
        3. checkboxtest.php
          1 kB
        4. formlib.patch
          3 kB

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              mvidberg Marko Vidberg
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Aparup Banerjee
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Nov/11