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

html_quickform_toggle_checkboxes use getElementsByClassName which is not supported by ie

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      Hide

      Test needs to be done on IE, FF, chrome, Safari and any other browser you may have.
      Test 1:
      Use the attached test script.
      When you click "select all/none", the checkbox state should toggle.
      Disable JS, reload page and click "Select all/none"
      Test 2:

      1. Go to a course
      2. Click on Settings > Grades
      3. Click on Settings > Grade Administration > Export > Excel
      4. In the Grade items to be included fieldset at the bottom, click Select all/none
      5. checkbox should toggle
      6. Try above with JS disabled.
      Show
      Test needs to be done on IE, FF, chrome, Safari and any other browser you may have. Test 1: Use the attached test script. When you click "select all/none", the checkbox state should toggle. Disable JS, reload page and click "Select all/none" Test 2: Go to a course Click on Settings > Grades Click on Settings > Grade Administration > Export > Excel In the Grade items to be included fieldset at the bottom, click Select all/none checkbox should toggle Try above with JS disabled.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-mdl-28972

      Description

      While testing MDL-28737, it was observed that html_quickform_toggle_checkboxes is using getElementsByClassName. This is not supported in ie.

      Message: Object doesn't support this property or method
      Line: 14
      Char: 5
      Code: 0
      URI: http://rajesh.moodle.local/moodle/test.php

        Gliffy Diagrams

        1. test.php
          1 kB
          Rajesh Taneja

          Issue Links

            Activity

            Hide
            timhunt Tim Hunt added a comment -

            Hmm. If you search for document.getElementsByTagName, you sill see that we are using getElementsByTagName in lots of places, not just the one occurrence I added. Big nasty clean-up job for someone.

            Show
            timhunt Tim Hunt added a comment - Hmm. If you search for document.getElementsByTagName, you sill see that we are using getElementsByTagName in lots of places, not just the one occurrence I added. Big nasty clean-up job for someone.
            Hide
            loquela Simon Clegg added a comment -

            I've recently reported a related bug MDL-31467
            Is there a progress on a resolution for the root of this issue?

            Show
            loquela Simon Clegg added a comment - I've recently reported a related bug MDL-31467 Is there a progress on a resolution for the root of this issue?
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Added Michael as watcher, so it can be pushed in next sprint.
            Also, I think priority should be increased to major.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Added Michael as watcher, so it can be pushed in next sprint. Also, I think priority should be increased to major.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Submit link with JS disabled is not working and orignalvalue parameter is not used in add_checkbox_controller, so should be handled in separate bug.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Submit link with JS disabled is not working and orignalvalue parameter is not used in add_checkbox_controller, so should be handled in separate bug.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Following fixed:

            1. checkbox controller JS is using YUI class.
            2. Since 20 non-JS checkbox controller was broken (select all/none in non-JS mode not working), is fixed now.
            3. Moved code to make it readable in checkboxcontroller function
            Show
            rajeshtaneja Rajesh Taneja added a comment - Following fixed: checkbox controller JS is using YUI class. Since 20 non-JS checkbox controller was broken (select all/none in non-JS mode not working), is fixed now. Moved code to make it readable in checkboxcontroller function
            Hide
            phalacee Jason Fowler added a comment -

            code looks fine, just update the test instructions to cover the scope of the changes made

            Show
            phalacee Jason Fowler added a comment - code looks fine, just update the test instructions to cover the scope of the changes made
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Thanks Jason,

            Updated test instructions.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Thanks Jason, Updated test instructions.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            This will likely be my last review for the day

            Show
            samhemelryk Sam Hemelryk added a comment - This will likely be my last review for the day
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Raj, this has been integrated now

            I did make one additional commit on master to fix up the variable names within that function.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Raj, this has been integrated now I did make one additional commit on master to fix up the variable names within that function. Cheers Sam
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Thanks Sam.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Thanks Sam.
            Hide
            abgreeve Adrian Greeve added a comment -

            Tested on 2.1, 2.2 and master on IE, Firefox, Chrome and Safari. Works fine. No probblems.
            Thanks.

            Show
            abgreeve Adrian Greeve added a comment - Tested on 2.1, 2.2 and master on IE, Firefox, Chrome and Safari. Works fine. No probblems. Thanks.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            FCT (fixed, closing, thanks). Ciao

            "I feel a very unusual sensation - if it is not indigestion, I think it must be gratitude!"
            ~ Benjamin Disraeli

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - FCT (fixed, closing, thanks). Ciao "I feel a very unusual sensation - if it is not indigestion, I think it must be gratitude!" ~ Benjamin Disraeli

              People

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

                Dates

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