-
Bug
-
Resolution: Fixed
-
Minor
-
4.4
-
MOODLE_404_STABLE
-
MOODLE_404_STABLE
-
MDL-81595-main -
-
Team Hedgehog 2024 Sprint 1.4
When you have groups mode enabled, mdl_communication has one instance active for the course, plus n instances for each group, for example 2 groups will have 3 instances (2x groups and 1x course).
The issue is that when you switch providers (eg matrix to custom link), the correct instances are created/enabled, however only the groups instances are disabled, the course level instance for the disabled provider is still active. The result is that when you visit the communication settings page again, you will throw a database error due to multiple rows being returned when one is expected, which also results in the wrong provider being displayed. This cannot be fixed by simply disabling communication on the course, as that does not change the active status of the row that was expected to be inactive already.
Steps to reproduce (assumes Synapse is set up and running):
- Enable communication on the site.
- Enable the Matrix communication provider on a course, running cron etc so everything is set up and active.
- Set up 2 groups and add some users to them.
- Switch the course to visible groups. Run cron again so comm/matrix is updated.
- Switch the provider on the course to custom link. Save and run cron.
- Navigate back to the communication page -> you will see a database error, and potentially the Matrix comm info will be loaded instead of custom link.
The database error is as follows:
Error: mdb->get_record() found more than one record!
|
line 1696 of /lib/dml/moodle_database.php: call to debugging() |
line 1656 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql() |
line 1635 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select() |
line 393 of /communication/classes/processor.php: call to moodle_database->get_record() |
line 71 of /communication/classes/api.php: call to core_communication\processor::load_by_instance() |
line 97 of /communication/classes/api.php: call to core_communication\api->__construct() |
line 65 of /communication/classes/helper.php: call to core_communication\api::load_by_instance() |
line 445 of /course/edit_form.php: call to core_communication\helper::load_by_course() |
line 217 of /lib/formslib.php: call to course_edit_form->definition() |
line 153 of /course/edit.php: call to moodleform->__construct() |
- Discovered while testing
-
MDLQA-18913 CLONE - Group support in communication providers exploratory testing
- Passed