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

Select all and Deselect all do not work in Choice Module

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Choice
    • Labels:
      None
    • Environment:
      Mac OS 10.6.8 Server with PHP 5.3.4 and Apache2.
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Create a Choice and have some students make the choice. As a teacher go to view the results. Click the links for Select all or Deselect all and the page moves to the top but does not change any selections.

      Show
      Create a Choice and have some students make the choice. As a teacher go to view the results. Click the links for Select all or Deselect all and the page moves to the top but does not change any selections.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      master_MDL-29690

      Description

      When I am readying a Moodle choice in Moodle 2.1.1 for reuse I try to Select all but instead the page just returns to the top with no change in selection. The Deselect all link also makes no changes to the selection. I have tried fiddling with the group settings but that has not changed anything.

        Gliffy Diagrams

          Activity

          Hide
          danmarsden Dan Marsden added a comment -

          adding a patch that fixes it but I'm not sure if this will get past the integrator

          NOTE TO INTEGRATOR - the above patch will cherry-pick cleanly onto 20Stable and 21Stable branches - it should also be applied there.

          The old code uses the functions select_all_in/deselect_all_in which are old functions that should be deprec and replaced by yui3 stuff - the only reference I could find to using these functions in master was the choice mod - so we can probably remove those functions now.

          This patch replaces the existing call to another function that should probably be deprec too: checkall/checknone - these functions are used in a handful of other places in Moodle but I couldn't find a new "core" replacement for it.

          A new issue/bug could be created to convert all existing selectall/selectnone style calls in moodle to use a new YUI 3 function - but that probably isn't coming any time soon - I guess as this fixes a bug and uses similar code to other parts of moodle it should be ok to pass and integrate?

          thanks.

          Show
          danmarsden Dan Marsden added a comment - adding a patch that fixes it but I'm not sure if this will get past the integrator NOTE TO INTEGRATOR - the above patch will cherry-pick cleanly onto 20Stable and 21Stable branches - it should also be applied there. The old code uses the functions select_all_in/deselect_all_in which are old functions that should be deprec and replaced by yui3 stuff - the only reference I could find to using these functions in master was the choice mod - so we can probably remove those functions now. This patch replaces the existing call to another function that should probably be deprec too: checkall/checknone - these functions are used in a handful of other places in Moodle but I couldn't find a new "core" replacement for it. A new issue/bug could be created to convert all existing selectall/selectnone style calls in moodle to use a new YUI 3 function - but that probably isn't coming any time soon - I guess as this fixes a bug and uses similar code to other parts of moodle it should be ok to pass and integrate? thanks.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Thanks Dan - this has been integrated now (merged to master - cherry-picked to 21, 20).

          You are quite right really both of those function should be deprecated at some point and converted to a single YUI function.

          Cheers
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Thanks Dan - this has been integrated now (merged to master - cherry-picked to 21, 20). You are quite right really both of those function should be deprecated at some point and converted to a single YUI function. Cheers Sam
          Hide
          rwijaya Rossiani Wijaya added a comment -

          Hi Sam,

          The patch for m2.0 is not integrate appropriately. It has control version character such as '<<<<<<< HEAD'. I'm attaching screenshot from git.moodle.org page.

          The patch works great on m2.1 and master.

          Show
          rwijaya Rossiani Wijaya added a comment - Hi Sam, The patch for m2.0 is not integrate appropriately. It has control version character such as '<<<<<<< HEAD'. I'm attaching screenshot from git.moodle.org page. The patch works great on m2.1 and master.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Wow thanks for spotting that Rosie!
          I must've forgotten to add the fixed file before committing the merge and pushing it to integration.
          I've now rectified that and its up there again

          Cheers
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Wow thanks for spotting that Rosie! I must've forgotten to add the fixed file before committing the merge and pushing it to integration. I've now rectified that and its up there again Cheers Sam
          Hide
          rwijaya Rossiani Wijaya added a comment -

          Thanks for fixing this Sam.

          Its all good now.

          test passed.

          Show
          rwijaya Rossiani Wijaya added a comment - Thanks for fixing this Sam. Its all good now. test passed.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Many thanks for the hard work developing and testing this. It has been spread to cvs and git upstream repositories.

          Closing, ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for the hard work developing and testing this. It has been spread to cvs and git upstream repositories. Closing, ciao

            People

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

              Dates

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