Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9.1
-
Component/s: Block: Email_list
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Description
Copied from this discussion - http://moodle.org/mod/forum/discuss.php?d=106627:
"The option for send notified mail to users doesn't work with the version 1.4.
The reason is the following line of block_email_list.php script:
if ( $preferences->trackbymail === 1 and $CFG->email_trackbymail == 1 ) {
The function var_dump show that " $preferences->trackbymail" is string(1) type. So, the condition is false and the warnings to the user's email address are not send."
I've verified that changing the above line to the following results in correct email alerts when the preference is set -
if ( $preferences->trackbymail == 1 and $CFG->email_trackbymail == 1 ) {
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Hi Ann,
I'm applies this other solution:
// If NOT enabled
if ( $CFG->email_trackbymail == 0 ) { return true; }
// User can definied this preferences?
if ( $preferences = get_record('email_preference', 'userid', $user->id) ) {
if ( $preferences->trackbymail == 0 ) { continue; }
}
See this code in this environment (http://cvs.moodle.org/contrib/plugins/blocks/email_list/block_email_list.php?revision=1.15&view=markup)
Thanks for your hard work,
Toni