FilterCodes icon

FilterCodes

Maintained by Michael Milette
Transform your Moodle site with the FilterCodes Plugin! Elevate engagement by inserting about 200 dynamic plain-text tags like {firstname} to create personalized learning experiences, customize your site and course content, display progress bars, simplify Contact Form customization effortlessly and much more. FilterCodes empowers educators to revolutionize Moodle into a dynamic, personalized platform. Join the community of FilterCodes enthusiasts to unlock the potential of your Moodle LMS site.
Price option: Free

Supports Moodle 2.7-5.2 See all versions
Latest release: 1 week ago
Installations: 7815
Downloads (last 90 days): 2421

Frankenstyle name: filter_filtercodes
Filters

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

An updated version of the Contact Form for Moodle plugin as well as the FilterCodes plugin is now available. The new versions will automatically detect and use reCAPTCHA v2 when installed on Moodle 3.1.11+, 3.2.8+, 3.3.5+, 3.4.5+ and of course 3.5+. If you are using reCAPTCHA with Contact Form for Moodle, you must upgrade both of the plugins as soon as possible.
Hello All,
Recently I asked Michael a few questions about this amazing plugin! I was trying to make the filter codes work in the custom menu. Sadly the plugin didn’t seem to work and I didn’t see why it was not working. Since i asked Michael in a PM, my question and the response are not listed here:
My question:
I am trying to use it to make custom admin menu items that only show for admins. To do this I am adding the codes you have given us in the documentation: https://github.com/michael-milette/moodle-filter_filtercodes/blob/dev050/README.md#usage
Am i doing something wrong?
~~~~~~~~~~~~~~~
Michaels response:
Many Moodle Themes don't support filters in the custom menu. In order to enable support, you will need to add the code provided in the FAQ section of the
documentation for the FilterCodes plugin.
To enable filter support for custom menus, see: https://github.com/michael-milette/moodle-filter_filtercodes/blob/master/README.md#can-i-use-filtercodes-in-custom-menus
As you are using the Boost theme, be sure to follow the instructions for themes based on boost, not for themes based on bootstrap. Note: If you make the change to the core Moodle theme instead of a child theme, you may need to remember to re-apply the change if you upgrade to a newer version of Moodle in the future.
As for your tags, if you just want your menu to show up for Administrators, the following will do:
{IFADMIN}ADMIN{/IFADMIN}
If you want it to appear for both Managers and Administrators, then use:
{IFMINMANAGER}ADMIN{/IFMINMANAGER}
In fact, you could put your whole menu inside the tags. There are examples of how to do this in the documentation as well. See: https://github.com/michael-milette/moodle-filter_filtercodes/blob/dev050/README.md#filtercodes-in-a-custom-menu
In that example, the only reason that I have both {IFMINMANAGER} and {IFADMIN} tags is because I wanted to demonstrate that you can create an admin menu that would be available to Managers and Admins, but with certain options only available to admins.
Hi Michael,
Thanks for your quick response.
I have made a feature request.
In case you were going to program these weeks, it would be cool if this request can be granted smile.
And otherwise I will wait until May 2018 smile.
Thank you very much for this plug-in! This makes Moodle a whole lot more 'personal'.
Sincerely,
Kees Koopman.
Hi Kees,
Great suggestion for a new tag! It should be possible. Just go to the Bug Issue Tracker at https://github.com/michael-milette/moodle-filter_filtercodes/issues and add your suggestion for the new tag. Use the subject line with "Feature request: {ifmemberofgroup}". I will also need you to include a detailed example of how you might want to use this feature.
I can't make any promises but I will see if I can get it into the next release scheduled for May, around the same time as Moodle 3.5. If you need it sooner, you can submit a pull request. I am also available for hire.
Thanks again for taking the time to write. I really appreciate it.
Best regards,
Michael
Hi,
This is a great plug-in! Thanks!
Is it possible to add a filtercode, such as: "IfMemberOfGroup xxx} and {/IfMemberOfGroup} (where XXX is the group-id)
That would be very nice!
Why thank you Blair, that is so kind of you. I love working with Moodle and people like you and have every intention to continue the work I have started well into the future.
Hi Bert, thanks! Glad you wish it. it's unfortunate that there's a conflict with easy Certificate, another nice plugin I've used myself on many Moodle sites. Do take a glance at the bug huntsman wherever I actually have planned an answer. As for obtaining it into Quickmail and electronic communication too, it is a Moodle filter. If the plugins build use of format_text() and format_string() functions, FilterCodes can work. It's up to the author of the plugins to use the functions.check itemguides.com
You will get your answer.
I think this is one of the most awesome plugins! I hope you continue to support it forever!
Hey, thanks, Michael! I just read your reply from October 17th!
Oh darn! Sorry about that George. Looks like I uploaded the old version (with the new release notes) instead of the latest version. Thanks for letting me know. I've updated it on Moodle.org.
Good morning,
I noticed that the latest version 0.4.2 with the fixed https ReCPATCHA issue is only available via Github.
Kind regards,
George
Hi Ralf,
Thank you for bringing this up. Nice to know people check my work. These are actually empty/blank by design. Most people will not want to put anything in these fields.
They are for special situations where a user is not logged into your website but you still want them to have a first, last name, username and email address. I can't think of a situation like that but they are available just in case. You'll find more information on this in the FAQ section of documentation. See:
https://github.com/michael-milette/moodle-filter_filtercodes#when-a-user-is-logged-out-the-first-name-surname-full-name-email-address-and-username-are-empty-how-can-i-set-default-values-for-these-tags
Thanks great tool. Can you check the lang file. There are four empty strings.
Hi Blair, thanks for the suggestion. I have great news for you. The next release of FilterCodes will include a new tag called {alternatename}. And just for you, if it is empty, it will be substituted with the user's firstname. That way you don't need to deal with firstname or alternatename. It will just always work with {alternatename}. smile
Hi Bert, thanks! Glad you like it. It is unfortunate that there is a conflict with Simple Certificate, another great plugin I've used myself on several Moodle sites. Do take a look at the bug tracker where I have proposed a solution. As for getting it into Quickmail and messaging too, it's a Moodle filter. If the plugins make use of format_text() and format_string() functions, FilterCodes will work. It's up to the author of the plugins to apply the functions.