-
Bug
-
Resolution: Fixed
-
Minor
-
4.4
-
MOODLE_404_STABLE
-
MOODLE_404_STABLE
-
MDL-81391-main -
-
1
-
Team Hedgehog 2024 Sprint 1.3, Team Hedgehog 2024 Sprint 1.4
-
Small
There are a couple of cases where we try to use methods when there is no valid communication object yet. This throws an error.
One such error can be created by doing the following:
- Enable Matrix experimental setting (don't touch the course communication settings yet)
- Create a new course with groups set to 'Separate groups'
- Create a group
- Enrol a student and observe error 'Exception - Call to a member function get_all_userids_for_instance() on null'
There is another case that was discovered when developing for MDL-81333 and will require the newly added functionality to recreate the error, but the steps are similar to above:
- Enable Matrix experimental setting (don't touch the course communication settings yet)
- Create a new course with groups set to 'Separate groups'
- Create a group
- You should see an error saying 'Exception - Call to a member function get_room_name() on null'
We need to check these providers/communication objects exist before attempting to use their containing methods.
Note:
It might be as simple as just checking there is a processor for the communication in certain locations:
if (empty($communication->get_processor())) { |
return; |
}
|
- has a non-specific relationship to
-
MDL-78551 Implement initial group support in Communication providers
-
- Closed
-