-
Bug
-
Resolution: Fixed
-
Major
-
2.1.3, 2.3
-
MOODLE_21_STABLE, MOODLE_23_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
w27_
MDL-34036_m24_bulkrole -
"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:
- 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
- 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()
|