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

              People

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

                Dates

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