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

Select all button should not check disabled checkboxes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide
      1. copy attached files in your moodle website
      2. log in as admin and navigate to test-form.php
      3. Click on "check all" and make sure all checkbox get checked except disabled one
      4. Click on "uncheck all" and make sure all checkbox get unchecked except disabled one
      5. click on last checkbox and checkbox (one above gets disabled)
      6. Now repeat 3 and 4, make sure disabled one doesn't get updated.

      Test 2:

      1. Log in as admin
      2. navigate to test-mform.php
      3. click both "select all/none", and make sure checkbox disable toggle, except for disabled ones
      4. uncheck X (first checkbox) and Y1(last checkbox), get enabled
      5. now click second "select all/none" and make sure they get checked and unchecked.
      6. Now disable JS and reload page
      7. Click "select all/none" and make sure disabled one's doesn't change.

      note
      make sure to test all branches on at-least ie7 and ff

      Show
      copy attached files in your moodle website log in as admin and navigate to test-form.php Click on "check all" and make sure all checkbox get checked except disabled one Click on "uncheck all" and make sure all checkbox get unchecked except disabled one click on last checkbox and checkbox (one above gets disabled) Now repeat 3 and 4, make sure disabled one doesn't get updated. Test 2: Log in as admin navigate to test-mform.php click both "select all/none", and make sure checkbox disable toggle, except for disabled ones uncheck X (first checkbox) and Y1(last checkbox), get enabled now click second "select all/none" and make sure they get checked and unchecked. Now disable JS and reload page Click "select all/none" and make sure disabled one's doesn't change. note make sure to test all branches on at-least ie7 and ff
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-mdl-32150

      Description

      The specific instance of this that was encountered can be found on MDL-32137. But I guess this is a more generic stuff. "checkall" function checks all check-boxes doesn't matter if they are tagged disabled or not. Same is the case with "select none", it unchecks everything.
      I am not sure if this is going to cause any security risk or not, normally we have validation on the server side for these cases, still if we proper validation is missing than it can cause security risk.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rajeshtaneja Rajesh Taneja
              Reporter:
              ankit_frenz Ankit Agarwal
              Peer reviewer:
              Jason Fowler
              Integrator:
              Sam Hemelryk
              Tester:
              Andrew Davis
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/May/12