A few weeks back I upgraded my Moodle 2.1 site to Moodle 3.5.2 (3.6 wasn't out while we were testing...)
As part of the upgrade I needed to change the language strings that create the emails that get sent to students when they enrol, or are enrolled in courses. I have customized the welcometocoursetext string in the core and enrol_self components to:
Hello {$a->firstname} {$a->lastname},
You have been enrolled in the "{$a->coursename}" course on the {$a->sitename} site. You now have access to this course and can begin your learning path...
The problem is that Moodle is only doing some of those "variable substitutions". Instead of replacing the {$a->sitename}, {$a->firstname} and {$a->lastname} variables with the text linked to those variables the email contains the actual {$a->sitename}, {$a->firstname} and {$a->lastname} variables as text, like this:
Hello {$a->firstname} {$a->lastname},
You have been enrolled in the "Maths 101" course on the {$a->sitename} site. You now have access to this course and can begin your learning path...
So, it's printing those actual variable names instead of the text associated with those respective language variables. The exception is that Moodle IS correctly translating the {$a->coursename} variable and showing the correct text, "Maths 101".
So, why is Moodle only printing SOME of the language strings?
It should be:
Hello Mary Jane,
You have been enrolled in the "Maths 101" course on the ABC University site. You now have access to this course and can begin your learning path...
I have purged all the Moodle and browser and
server caches, but that doesn't seem to help - users still get the emails with those variable names printed in the body of the emails.
My Moodle runs on a cluster of Windows Server 2012 R2
VM's with an F5 load balancer and:
- IIS 8.5 FastCGI
- PHP 7.2.9 NTS
- File cache: Wincache (v2.0.0.8) - configured as the session.save_handler...
- Opcode Caching : Zend OPcache v7.2.9.0
I'm stumped! Does anyone know how to resolve this?
Thanks.