Πως να στέλνεται e-mail στον admin (support user) όταν κάνει εγγραφή κάποιος χρήστης)
- Details
- Category: Moodle
- Published: Friday, 21 March 2014 17:19
- Written by Super User
- Hits: 55
Όταν στο moodle έχουμε ενεργοποιήσει το self-registration και θέλουμε να παίρνουμε ως administrator ένα e-mail που να μας ειδοποιεί ότι κάποιος χρήστης έχει κάνει εγγραφή κάνουμε τα παρακάτω:
Send a duplicate of the registration email to the administrator
(Moodle 1.8) In /lib/moodlelib.php, search for the function send_confirmation_email (around line 3629 in 1.8.4+). At the end of the function there is a line that reads (2):
return email_to_user($user, $from, $subject, $message, $messagehtml);
Just before that line, add a line like this:
email_to_user($from, $from, $subject, $message, $messagehtml);
(Moodle 1.9) In /lib/moodlelib.php, search for the function send_confirmation_email (around line 4468 in 1.9.4+). At the end of the function there is a line that reads:
return email_to_user($user, $supportuser, $subject, $message, $messagehtml);
Just before that line, add a line like this:
email_to_user($supportuser, $supportuser, $subject, $message, $messagehtml);
(Moodle 2.0) In /lib/moodlelib.php, search for the function send_confirmation_email (around line 4468 in 1.9.4+). At the end of the function there is a line that reads:
return email_to_user($user, $contact, $subject, $message, $messagehtml);
Just before that line, add a line like this:
email_to_user($contact, $contact, $subject, $message, $messagehtml);
This can also be changed in '\moodle\enrol\self\lib.php' to send emails to '$contact' when someone self enrols.
Πηγή