-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: Incorrect number of query parameters. Expected 3, got 2. #9
Comments
I managed somehow to fix it. Here's the changes on locallib.php. public static function has_role($rids, $courseid, $uid) { global $DB; $params = array(); //foreach ($rids as $role) { // array_push($params, (int)$role); //} array_push($params, $rids, $courseid, (int)$uid); $roles = join(',', array_fill(0, count($rids), '?')); $r = $DB->count_records_sql("SELECT COUNT(id) FROM {role_assignments} WHERE roleid IN($roles) AND contextid=? AND userid=?", $params); if ($r > 0) { return true; } else { return false; } } |
Thanks for the report. This error has been fixed for a while (1.6 and 1.7 versions are ok). |
Hi @Hipjea , Sorry to resurrect this thread again but I do appreciate your advise what could be wrong with my current situation... I'm using version 1.7 and I have got a strange error below for the specific course only. The rest of the course were fine.
So I tried to print the value of variable
Any advise is deeply appreciated. Thanks! |
Hi,
After upgrading my Moodle from version 3.0+ to 3.3.5 and block_studentstracker from 2015051100 to 1.5 (2017062200), when viewing one of my courses is showing error message below. I will appreciate if you can help and advise? Thanks
The text was updated successfully, but these errors were encountered: