I want to send an email to the creator/teacher of student when any student Login to Moodle site.
i need to do this things using theme files if possible.
Also, i want to send email to users when some other users complete the course or access the course.
Admin will select the student how wants to get this kind of email notifications.
Any suggestion will be helpful to me.
Thanks for Reply and your help.
i checked with Event Monitoring to send email when user login.
But my issue is, i need to send email notification to student's manager/teacher only. according to event manager teacher need to subscribe for that RULE and teacher will receive notification for all user login, not only for their student. also there is not user related data variable to send email with user details.
Same issue with when i want to send email notification to subscribe user/student of particular organization when some other user access or complete the course.
Please help me if i can add some rules/condition when creating EVENT MONITORING RULES to send emails related to their organisation and their teachers only.
In this case you would need to add code to your theme for handling such specific case.
You will need to create event observer for core\event\user_loggedin
See this thread for one example of creating event observer
Thanks for your Replay and Help.
can you please help me for where i can add the code in my theme folder ? like...
Any of the code example will be helpful to me related to my event handling task.