Change email content when role is approved from admin

Change email content when role is approved from admin

by Amir Mustafa -
Number of replies: 1

Hello Developers,

I have a case here when a role is approved  a mail is sent to the user. In my case I have a Inspector approved role, when I approve it from admin (i.e. Course view --> setting --> more --> enrolled user). 

On clicking the user icon from the list of user click on Inspector approved role an empty email is sent to the respective user.

I need to write the content in the mail.

 Please suggest me 

Thank you smile


Average of ratings: -
In reply to Amir Mustafa

Re: Change email content when role is approved from admin

by Colin Fraser -
Picture of Documentation writers Picture of Testers
I am going to assume this is the automated "Welcome to Moodle xxxx" email you're talking about, but that is not what is happening. Can you please be more specific on what you mean when you say "when a role is approved a mail is sent to the user". Does this mean you are creating new Roles for users and a blank email is sent to the person who is given that Role? Or, does it mean that when a new user is enrolled into your Moodle the usual Welcome message is not sent? 
If it is the former, then likely not a lot I can help with, except to say that it is likely no email message has been set up to send. (This is also assuming that emails have been set up properly in the first place.)  You may have to write one up yourself and whenever a Role is assigned, it is automatically sent. 

If it is the latter, the usual Welcome email, then depending on the language of your Moodle, (Hindi, Urdu, or any one of the other included officially recognised 20 odd languages of India) there may not necessarily be an available email Welcome message in your setup. 
If you go to your Language Pack in Site Administration > Language > Language Customisation (look in this Moodle Doc first),  you should be able to find the email message section, in "moodle.php" file from memory, and create a new message of your own. 
Cheers,