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.
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:
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..
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.)
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
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.)
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.
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
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.
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.