How to edit enrolment expiry notice to order by date, not last name in 3.1.2+ (Build: 20161020)

How to edit enrolment expiry notice to order by date, not last name in 3.1.2+ (Build: 20161020)

by Debbie Kay -
Number of replies: 2

Hi 

I recently upgraded to 3.1 from 1.9. and want to order expiry notification emails by date of expiry instead of alphabetically by last name as it does now.

In 1.9 enrolment expiry notice received had 2 parts.

At the beginning of the notification email were any student expiring in the threshold number of days set.  (For us = 21 days)

Below that, separately was a list of those expiring within the threshold time (i.e. within 21 days.)

This made it easy for us as we only acted on the names expiring in 21 days (sending a personal reminder also)

Moodle 3.1 expiry email received does not separate those expiring in threshold set number from the rest.

Instead it gives a list of all users expiring within the threshold number of days, ordered alphabetically by last name.

This means we have to look through every email carefully to identify newly added names added, instead of simply looking at those expiring in threshold number of days.

Can anyone tell me how we edit this email to be formatted like 1.9 one, or at least order by expiry date, not last name.

Many thanks!

Average of ratings: -
In reply to Debbie Kay

Re: How to edit enrolment expiry notice to order by date, not last name in 3.1.2+ (Build: 20161020)

by Debbie Kay -

Hi

I found the area which needs editing in the language pack, it is now in enrol_manual.php (not moodle.php)

I hope I could at least regain the 2 part notice by copying the code from our 1.9 instance, but find some elements do not work.

Can anyone help with what was '$a->current' (inserted users expiring in the threshold number of days selected) and '$a->past' (inserted users expiring within the threshold number of days) used in 1.9 has changed to in 3.1 to show the same information?

Or how to edit the existing notification to order by date would be a good solution as well, if anyone can offer that.

Many thanks for reading!

In reply to Debbie Kay

Re: How to edit enrolment expiry notice to order by date, not last name in 3.1.2+ (Build: 20161020)

by Debbie Kay -

Still stuck with this.

Can anyone shed any light on how to achieve this?

Many thanks!