Issue Details (XML | Word | Printable)

Key: CONTRIB-746
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Toni Mas
Reporter: Ann Adamcik
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Non-core contributed modules

Email alerts are not being sent to users external email addresses

Created: 08/Oct/08 12:10 AM   Updated: 17/Oct/08 08:21 PM
Component/s: Block: Email_list
Affects Version/s: 1.9.1
Fix Version/s: 1.7, 1.8, 1.9

Participants: Ann Adamcik and Toni Mas
Security Level: None
Resolved date: 17/Oct/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
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 ) {



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Toni Mas added a comment - 17/Oct/08 08:21 PM
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