-
Bug
-
Resolution: Fixed
-
Critical
-
2.0.6, 2.1.3, 2.2
-
Any
-
MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_20_STABLE, MOODLE_21_STABLE
-
MDL-30260_disable_messages -
This is a regression from MDL-22232.
I am looking at line 146 of lib/messagelib.php https://github.com/moodle/moodle/commit/a6f388c6640b14691601b852fe0b584425680c4f#L2R146
1. This code assumes that whatever is calling message_send has set $eventdata->userto->emailstop, even though this has not been required by the API for all the time from Moodle 2.0 to 2.1.2. Therefore lots of places call this without that field being set - in particular in one of my third-partly plugins. I don't recall this API change being publicised anywhere.
a. Thus, it should be mentioned in the release notes - I added http://docs.moodle.org/dev/Moodle_2.1.2_release_notes#Random_API_changes. Since 2.1.2 and people have already read the release notes an upgraded, we probably need to flag this where people will see too.
b. If that field is not set, then we need a developer debug warning, and
c. we should probably have an extra DB query to load the correct value from the DB, rather than behaving as if it were null.
2. It fails to check emailstop in the 'forced' branch of the if statement, so the emailstop functionality does not eve work reliably, other than with default configuration.
- Discovered while testing
-
MDL-30543 navigation lib generating php warnings in messaging
- Closed
-
MDL-30545 someone enrolled as a teacher in a course doesnt seem to be able to see quiz related message notifications in their messaging preferences
- Closed
- has a non-specific relationship to
-
MDL-26304 Where has the 'emailstop' user profile field gone?
- Closed
- has been marked as being related by
-
MDL-40669 Upload users via text file should include the optional user field 'disable notifications'
- Closed
- is blocked by
-
MDL-24694 empty email notification of assignment submissions when assignment updated.
- Closed