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

Bulk User Actions results in ERROR: Incorrect number of query parameters

    Details

    • Testing Instructions:
      Hide
      1. Site Administration > Users > Accounts > Bulk user actions
      2. Click Show Advanced
      3. Select Course Role = student and pick a category
      4. Add filter
      5. Repeat steps above using a different category
      6. no db exception exptected
      7. verify each of the 3 selectors works - the last one (text field) is short course name
      Show
      Site Administration > Users > Accounts > Bulk user actions Click Show Advanced Select Course Role = student and pick a category Add filter Repeat steps above using a different category no db exception exptected verify each of the 3 selectors works - the last one (text field) is short course name
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w27_MDL-34036_m24_bulkrole

      Description

      "ERROR: Incorrect number of query parameters" when adding filters to Bulk User Actions.

      This has been reproduced in 2.1.3 and master (2.4).

      Steps to recreate:

      1. Site Administration > Users > Accounts > Bulk user actions
      2. Click Show Advanced
      3. Select Course Role = student and pick a category
      4. Add filter
      5. Repeat steps above using a different category
      6. Error message: ERROR: Incorrect number of query parameters. Expected 7, got 3.

      Once I have the error, navigating away from and back to the page doesn't make the error go away. To make the error go away, it seems that I have to log out and log in again.

      Debug:
      Stack trace:

      line 726 of /lib/dml/moodle_database.php: dml_exception thrown 
      line 804 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params() 
      line 1290 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql() 
      line 1365 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql() 
      line 1536 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql() 
      line 1519 of /lib/dml/moodle_database.php: call to moodle_database->count_records_sql() 
      line 30 of /admin/user/lib.php: call to moodle_database->count_records_select() 
      line 32 of /admin/user/user_bulk.php: call to get_selection_data() 

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting that, Chris.

            Feel free to work with us on this issue.

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting that, Chris. Feel free to work with us on this issue.
            Hide
            skodak Petr Skoda added a comment -

            thanks for the report

            Show
            skodak Petr Skoda added a comment - thanks for the report
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated, thanks.

            Show
            poltawski Dan Poltawski added a comment - Integrated, thanks.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Works as expected.

            Thanks for fixing this, Petr.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Works as expected. Thanks for fixing this, Petr.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Congratulations your code is upstream - gold star for you!

            This issue + 79 others made it in in time for the minor releases.
            Thank you everyone involved for your exuberant efforts.

            Show
            samhemelryk Sam Hemelryk added a comment - Congratulations your code is upstream - gold star for you! This issue + 79 others made it in in time for the minor releases. Thank you everyone involved for your exuberant efforts.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/12