You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to upload company users from a CSV file, with selected courses to enrol into, I get the following exception:
Coding error detected, it must be fixed by a programmer: Invalid database query parameter value
More information about this error
Debug info: Objects are are not allowed: stdClass
Error code: codingerror × Dismiss this notification
Stack trace:
line 883 of /lib/dml/moodle_database.php: coding_exception thrown
line 902 of /lib/dml/moodle_database.php: call to moodle_database->detect_objects()
line 1277 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
line 1679 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1651 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 330 of /local/iomad/lib/user.php: call to moodle_database->get_record()
line 1057 of /blocks/iomad_company_admin/uploaduser.php: call to company_user::enrol()
I believe the problem lies with the file "/blocks/iomad_company_admin/uploaduser.php", line 1055.
The "$courseids[]" array is being populated with "stdClass" objects.
foreach ($formdata->selectedcourses as $selectedcourse) {
$courseids[] = $selectedcourse;
}
Replacing the above with the following code seems to fix the issue:
foreach ($formdata->selectedcourses as $selectedcourse) {
$courseids[] = $selectedcourse->id;
}
Many thanks
The text was updated successfully, but these errors were encountered:
encodecreate
pushed a commit
to encodecreate/Creation-Suite
that referenced
this issue
Jan 12, 2024
Hello,
When I try to upload company users from a CSV file, with selected courses to enrol into, I get the following exception:
I believe the problem lies with the file "/blocks/iomad_company_admin/uploaduser.php", line 1055.
The "$courseids[]" array is being populated with "stdClass" objects.
Replacing the above with the following code seems to fix the issue:
Many thanks
The text was updated successfully, but these errors were encountered: