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

Select all button should not check disabled checkboxes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.6, 2.2.3
    • 2.2.2
    • Libraries
    • MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • wip-mdl-32150
    • 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

      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.

        1. test-form.php
          2 kB
          Rajesh Taneja
        2. test-mform.php
          1 kB
          Rajesh Taneja

            rajeshtaneja Rajesh Taneja
            ankit_frenz Ankit Agarwal
            Jason Fowler Jason Fowler
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.