Using placeholders in forum messages

Using placeholders in forum messages

by Betonvereniging Nederland -
Number of replies: 8

Hello all,

As far as I can see, it's not possible to use placeholders in forum messages. I would like to use such a feature, so I can personalize announcements or other messages. So I'm mainly looking to include someone's name. Anyone else who sees value in such a feature?

Thanks!
Chantal

Average of ratings: -
In reply to Betonvereniging Nederland

Using placeholders in forum messages

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
You can "star" a post. You can sort posts within a topic. You can also do a word search. If you have opened and "seen" a discussion, they become unhighlightes. You can have forum messages emailed to you... this is what I prefer. I then delete them from my inbox when I am finished with them. Those that remain in my inbox need my attention.

Can you provide a mock-up or description of what you desire?
In reply to Rick Jerz

Using placeholders in forum messages

by Betonvereniging Nederland -
All valid options, but they don't personalize the message.

As admin, I often use the announcements forum to send messages to groups. General stuff about new material added to the course or schedule changes. The participants receive an email when I post something. That's great. But I feel my messages would have more impact if I can use placeholder, like the first name, so the person receiving the message feels like they are addressed personally.

Instead of starting my message with "Dear participant", I could then start with "Dear [name]". If someone then sees the message in their inbox or when they review the message on the forum, it actually says their name.
In reply to Betonvereniging Nederland

Using placeholders in forum messages

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I once tried a Moodle plugin that provided variables, like ${A}, that would allow a more "personalized" environment. I forgot its name, but maybe someone else will remember. I also don't know if the variables could be used in forum posts.

I prefer "Dear MBA8150 Students." It identifies that the email is from a course. But this is not to say that it is better than what you want.
In reply to Rick Jerz

Using placeholders in forum messages

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
The filter code plugin allows for variables in blocks, I do not think it would be useable in forums but I could be wrong.
https://moodle.org/plugins/filter_filtercodes
In reply to Shirley Gregorczyk

Using placeholders in forum messages

by Dave Foord -
Picture of Particularly helpful Moodlers

The Filtercodes plugin (which is excellent by the way) will work in forums so when the post is viewed via Moodle, it would show the personalied elements.

But when the email is sent out, the email that goes out is the same for all subscribers so would end up displaying the filtercode tag rather than the desired personalised text - so not what you want.

Average of ratings: Useful (2)
In reply to Dave Foord

Using placeholders in forum messages

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I would imagine, that if you searched for and modified the correct language string for the message, you could add filter code to it. It has been so long that I do not trust my memory of this, but I think I did this using a Generico filter template.
In reply to AL Rachels

Using placeholders in forum messages

by Dave Foord -
Picture of Particularly helpful Moodlers

I might be wrong (and if I am hopefully someone can correct me)- but my understanding is, that once the email is sent, any moodle filters (e.g. filtercodes, Generico or any other filter) won't work inside the email, as there is no longer the direct connection back to the Moodle database that effectively swaps the filter syntax out, and replaces it with the desired code.

Some of the emails that come out of Moodle, have wildcards as part of them, e.g. assignment submission emails - and with these the variable text is injected into the email before it is sent. But the forum email's do not have this functionality.

Average of ratings: Useful (2)
In reply to Dave Foord

Using placeholders in forum messages

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
As I said, I do not trust my memory due to age related forgetfulness. And, I just have so much other stuff going on I do not have the time to test it.
I have learned, that if you are running your OWN MOODLE, and provide nicely detailed and thorough instructions to the right LLM, you CAN get one of the AI's to implement the changes needed to the forum for your site. If you tell it to do it as a patch to the code and save the patch, you should be able to reapply the same patch after an upgrade to your site if they do not change the forum code. Of course, if an AI can do it for you once, it can probably do it again.