Enrolment Expiry Notification - Sender's email address is wrong - Moodle 2.9.3

Re: Enrolment Expiry Notification - Sender's email address is wrong - Moodle 2.9.3

by Helen Foster -
Number of replies: 4
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

As far as I know, the sender's name is the name of the first user to be assigned the role of teacher in the course. (The same applies to course welcome emails.)

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

Re: Enrolment Expiry Notification - Sender's email address is wrong - Moodle 2.9.3

by Femi Lana -

Hi there,
I've been looking for a solution to this problem myself.

I have exactly the same problem.

We would like to keep the notification emails as it is handy for students to know when their course expires so don't want to switch it off completely) But how does one go about editing the senders email? We are using moodle 3.2
thanks

In reply to Femi Lana

Re: Enrolment Expiry Notification - Sender's email address is wrong - Moodle 2.9.3

by Sam Misemer -

Happy holidays all!

A reply to the last entry, and a sort of reply to earlier...

We recently enabled expiry on courses and wanted to change the default notification, as the teacher (instructor, et cetera) is not who determines the enrollment duration in our model.

After much research and finally digging into the language files, I found this:

Dear {$a->user}, This is a notification that your enrollment in the course '{$a->course}' is due to expire on {$a->timeend}. If you need help, please contact {$a->enroller}.

Located here: Component - enrol_manual / String - expirymessageenrolledbody

So as an admin, go to Site administration --> Language --> Language customisation, then choose your language, and in the Filter Strings dialog, choose the enrol.php under the core section, I found it using 'exp' as my "Only strings containing" parameter.

We are going to change this to be more customized for us, but I would like to know where and what the "enroller" variable is and how it's defined.

I hope this helps someone!

-SCM

Sam Misemer

Average of ratings: Useful (1)
In reply to Sam Misemer

Re: Enrolment Expiry Notification - Sender's email address is wrong - Moodle 2.9.3

by Sara Arjona Téllez -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Sam!

Happy holidays also to you! smile

The enroller variable is the user who is responsible for the enrolment instance in this course. Usually it is the first editing teacher - the person with "highest authority" as defined by sort_by_roleassignment_authority() having 'enrol/self:manage' capability.

Does it helps you? wink

Kind regards,

Sara

In reply to Sara Arjona Téllez

Re: Enrolment Expiry Notification - Sender's email address is wrong - Moodle 2.9.3

by Debbie Kay -

Hi

I know this is an old post, but I am trying to resolve the same issue in Moodle 3.4

Can anyone expand on where I see and set the person with 'highest authority'?

As per Saras comment  "Usually it is the first editing teacher - the person with "highest authority" as defined by sort_by_roleassignment_authority() having 'enrol/self:manage' capability."

Many thanks!

Average of ratings: Useful (1)