welcome email shows old admin as sender

Re: welcome email shows old admin as sender

by Jon Bolton -
Number of replies: 9
Picture of Particularly helpful Moodlers Picture of Testers

I get your logic - but be careful. Moodle has quite a complex database structure so changing things in the back end without knowing how that will impact on all the relationships can result in unexpected behaviour.

In reply to Jon Bolton

Re: welcome email shows old admin as sender

by Boryana Peneva -

Hi Jon

How can I set the welcome emails about course enrollments to come from a generic email address rather than teachers?

I have enabled:


Always send email from the no-reply address? emailonlyfromnoreplyaddress
Default: No

If enabled, all email will be sent using the no-reply address as the "from" address. This can be used to stop anti-spoofing controls in external mail systems blocking emails.


But the emails are still being sent from the course teachers..


In reply to Boryana Peneva

Re: welcome email shows old admin as sender

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hello,

In Moodle 3.1, the welcome message email is sent from a user with the role of course contact (as set by an admin in Courses in the Site administration), normally a teacher. If more than one user has this role, the welcome message email is sent from the first user to be assigned the role.

In Moodle 3.2 onwards, in the Self enrolment settings you can specify whether the welcome message is sent from the course contact, the keyholder or the default no-reply address. If the course contact is chosen, then this is the first teacher to be added to the course (if there is more than one teacher.)

Average of ratings: Useful (2)
In reply to Helen Foster

Re: welcome email shows old admin as sender

by Caitlyn Duggan -

Hi Helen

We've been looking at this and when we've tested, the welcome message appears to come from the "teacher" with the surname that is first in the alphabet, not by the first teacher to be added to the course. We tested a few time to be sure. Could this be correct?

Many thanks

Caitlyn

In reply to Caitlyn Duggan

Re: welcome email shows old admin as sender

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Caitlyn,

As you've tested things a few times, it sounds like you've discovered a bug! I tried a quick search in the Moodle Tracker and couldn't find a report of the problem. Thus, if you've chance, please could you create an issue for it? (See Tracker introduction if you've not used the tracker before.)

In reply to Caitlyn Duggan

Re: welcome email shows old admin as sender

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Caitlyn,

I've had a look at the code that sends the self enrolment welcome email, and what you are seeing is what the code does: it selects the user with the surname that comes first in alphabetical order.

Whether this is the documented/expected behaviour or not, I don't know (by the way, according to git history, it's been this way since at least Moodle 2.7).

Saludos. Iñaki.

Average of ratings: Useful (1)
In reply to Iñaki Arenaza

Re: welcome email shows old admin as sender

by Caitlyn Duggan -

Hi Iñaki and Helen - happy new year!

The behaviour makes sense to me (selects the user with the surname that comes first in alphabetical order). - it perhaps just needs to be documented in the enrolment FAQs and the enrolment page. I'm not sure who does these updates?

Thanks for confirming our theory, many thanks

Caitlyn


In reply to Caitlyn Duggan

Re: welcome email shows old admin as sender

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks Iñaki for checking the code, and thanks Caitlyn for mentioning documenting the behaviour.

I think the current behaviour is a bug and have reported it as MDL-61236. I've also added a note about it to the documentation pages Self enrolment and Enrolment FAQ.

Regarding who does documentation updates, everyone is welcome to help! You can log in to Moodle Docs with your moodle.org username and password then edit pages.

Average of ratings: Useful (1)
In reply to Helen Foster

Re: welcome email shows old admin as sender [Solved]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Update: The problem of the course welcome message being sent from the course contact with surname that comes first in alphabetical order (MDL-61236) is fixed in Moodle 3.3.5 and 3.4.2 (scheduled for release on Monday 12 March 2018). Thanks to Farhan Karmali for fixing the bug. smile