To correctly treat that, you need to do a similar treatment as the one done in https://bugs.launchpad.net/mahara/+bug/1703608
for the methods get_subject and get message in the class ActivityTypeInstitutionmessage (line 1071 lib/activity.php).
The institution is available in $this->institution (passed throught $data at parent::_construct )
That kind of logic could be encapsulated in a helper class or even in institution class...
If I manage to get something working, I'll try to send you a proposal.
To correctly treat that, you need to do a similar treatment as the one done in https:/ /bugs.launchpad .net/mahara/ +bug/1703608
for the methods get_subject and get message in the class ActivityTypeIns titutionmessage (line 1071 lib/activity.php).
The institution is available in $this->institution (passed throught $data at parent::_construct )
That kind of logic could be encapsulated in a helper class or even in institution class...
If I manage to get something working, I'll try to send you a proposal.