-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.4
-
MOODLE_404_STABLE
When we moved the communication provider settings out of the course settings into their own page, the UI was moved, but the logic was all kept within the course settings. One of the reasons for this was that a couple of course changes require provider updates (namely course avatar changes and switching category to hidden), but we should just handle those properly and move everything else out - either by keeping those parts of logic in there (they only need to happen if the course settings change, and don't need to also be copied out into the communication updates), or possibly we could look into hooks for those.
The reason the current placement of this logic is not ideal is:
- It requires hacking the data when you actually save course setting, because it has to pull in the communication data to avoid overwriting it while saving course settings.
- The separate communication page is designed to be used for whichever context any current/future implementation of communication is used, so it may not only relate to courses in future.
- We're saving course settings unnecessarily when saving provider settings.