lsuonline / lsuce-block_quickmail

5 stars 32 forks source link

Problem with sql query in DB Oracle (2) #55

Open jaume77 opened 1 year ago

jaume77 commented 1 year ago

Hi!

When an email is sent to more than 1000 users in Moodle classrooms that are used as communication spaces for university faculties, when accessing to view the report (attached image)

quickmail_2

I get an error, because more than 1000 values are not allowed in a list, in Oracle (attached image)

quickmail_3 quickmail_4

Stack trace:
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 277 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
line 1157 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
line 1500 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_records_sql()
line 1473 of /lib/dml/moodle_database.php: call to moodle_database->get_records_select()
line 231 of /blocks/quickmail/classes/persistents/message.php: call to moodle_database->get_records_list()
line 61 of /blocks/quickmail/classes/controllers/view_message_controller.php: call to block_quickmail\persistents\message->get_message_recipient_users()
line ? of unknownfile: call to block_quickmail\controllers\view_message_controller->view_message()
line 167 of /blocks/quickmail/classes/controllers/support/base_controller.php: call to call_user_func()
line 91 of /blocks/quickmail/classes/controllers/support/base_controller.php: call to block_quickmail\controllers\support\base_controller->call_view()
line 69 of /blocks/quickmail/message.php: call to block_quickmail\controllers\support\base_controller::handle()

Could you reformulate the sql query to avoid showing this error? Thank you!