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 Sam Misemer -
Number of replies: 2

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)