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): 2567

Frankenstyle name: filter_filtercodes
Filters

Comments

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

Would there be any chance to get a filter code which could selectively show the date/time for each entry in Attendance? It would be nice to be able to put the date and time of a class (by the student's timezone) in the section header for the class without needing to type it in again (with a fixed timezone). Something like {attendance 2 dateTimeFormat} for the date and time of the second entry in Attendance?
Hi Sarah Ashley,
FilterCodes does not currently take file type custom profile fields into consideration. However it is certainly a feature worth considering.
Using the Bug Tracker link on this page, I would invite you to please submit a Feature Request Issue for further discussion. Please include the description, as you previously mentioned, along with one or more real life example of how it would be used.
Looking forward to hearing more about your vision.
Best regards,
Michael Milette
Hi Andrew, I am haply to hear that you like FilterCodes and find it useful.
I find your proposal to enhance the summary/details tag and create the mu tag interesting but have some questions.
Using the Bug Tracker link on this page, I would invite you to please submit two Issue tickets (one per feature request) for further discussion. Please include the description, as you previously mentioned, along with one or more real life example of how these new tags would be used.
Looking forward to hearing more about your vision.
Best regards,
Michael Milette
Hi Michael, we are big fans of FilterCodes. We are starting to promote the use of {details}{summary}{/summary}{/details}. But, some users have asked for some visual (CSS) presets e.g., the summary content should look like a heading or can the widget be presented "accordion" style when they are stacked.
I was thinking that a potential implementation is for the {details} tag to allow for an optional parameter e.g., {details style1} or {details style2} which would generate the HTML . My theme stylesheet would contain the relevant CSS i.e., this would not be part of the FilterCode code.
I am happy to get this developed as long as you don't think it goes against your plans.
In a similar vein, I am considering implementing a generic type FilterCode "{mu style1 style2 [...]}[Some content here]{/mu}" which would render as:
[Some content here]

So quite a simple pattern.
This would be used to display some elaborate (CSS-wise) content which includes borders, icons etc. We currently use Tables for this due to Editor limitations but it is not ideal.
I am happy to get this developed as long as you don't think it goes against your plans. Also happy if you suggest I develop my own filter plugin for this.
Kind regards,
Andrew
Hi Sarah,
If you did not install Moodle using Git, you will need to apply the changes manually. See:
https://github.com/michael-milette/moodle/commit/4d76c510a0571d30fb20d3341ef1ce36dd75eada
For a list of changes you will need to make to Moodle.
Hi Sarah,
Thank you for your question. Turns out that there was a mistake in the documentation. Try this:
git fetch https://github.com/michael-milette/moodle MDL-63219-M400
git cherry-pick FETCH_HEAD
If you have any further questions, please consider using the discussion forum. You will find the "Discussion" link on the FilterCodes plugin page under Useful Links.
I have Moodle 4.0 and it's not working, and I have tried both Technique A and Technique B, but I just don't understand what I'm doing. I have moodle installed on an Ubuntu headless server. For example, with Technique A, I put git fetch https://github.com/michael-milette/moodle/tree/MDL-63219-M400 master but I get the error fatal: not a git repository (or any of the parent directories): .git. I didn't use git to install Moodle. In technique B, I don't have a "/theme/yourtheme/classes/navigation/output/primary.php" in Boost. It's /theme/boost/classes/output/core_renderer.php No matter where in the file I paste the use filter_manager; thing it won't work. I don't understand exactly where to paste it. I also tried the code for Moodle 3.2 and can't get it to work and I don't know where to paste it either along with the previous code. In other words, I don't understand the instructions on trying to get this to work. Can you please clarify?
Hello Michael,
Thank you so much for this excellent plugin!
Is the custom profile field type "file upload" (https://moodle.org/plugins/profilefield_file) included in your consideration of custom profile fields?
I am unable to get the data in this field to display with {profile_field_shortname}. It simply displays 0.
We have users uploading certain images and ordinarily the link to the image is what displays on the user profile page.
I am trying to display the actual image in an HTML block as part of a custom Dashboard. Or provide the clickable link to the image.
Any thoughts?
Thanks again for this brilliant addition to Moodle! Kudos!
Hi Blair, you are correct. Teamcards show a list of all teacher. It is meant to be used to create a faculty page. Coursecontacts is the tag to use if you want to display a list of within the context of a course. To avoid having contacts show on the course description, you could hide it using some css or customize renderers in your theme to remove them completely.
Am I correct that teamcards shows a list of all Teachers in the entire Moodle system? That's what's happening when I test it. I can't make it only show those in a course. I know that I could use coursecontact, but that requires me to make other changes in our Moodle that create a snowball effect that we currently don't want (i.e., we don't want the contacts showing on the course description).
Hi Anselmo, glad you like the plugin. There is currently only the {ifprofile_field_shortname}{/ifprofile_field_shortname} tag which checks to see if the field is empty or or not. There is a plan for an ifprofile_field_contains tag but it has not been implemented yet. For more information and to follow its progress, join the conversation at https://github.com/michael-milette/moodle-filter_filtercodes/issues/84
Best regards,
Michael
Hi Michael and thank you for this great plugin. I have a question: is there a way to set a text depending on a specific field content? For example, I save a variable in the field institution. If the user institution is X, then the text will be "Hi, girl", otherwise the text will be "Hi, boy".
Hi Mathilde, this can happen if you interweave HTML and FilterCodes tags if the tag required a closing tag.
In the following example, you would end up with a closing div without an opening div if the user is not logged in which would mess up the layout of your page:
{ioggedin}< d i v >{/ifloggedin} < / d i v >
Ignore the extra spaces in the DIVs. The tags kept getting filtered out.
Hi Michael, although we’re using your plugin with great pleasure, we came across an issue I hope you can help us with. In our Moodle Workplace (3.11.6) environment, the filterCodes plugin somehow conflicts with (closing) the page structure. As a result, on the course category/courses page, we firstly face the footer overlapping the body text and, secondly, have an incorrectly structured page when a large number of search results are loaded. Does this sound familiar to you or do you have any suggestions on how to solve this? Greatly appreciating your response!
Best regards, Mathilde
Hi Thierry, check to make sure that no HTML ended up embedded in your tag.
If you think you found a bug, please report it by going to https://github.com/michael-milette/moodle-filter_filtercodes/issues where I will have more questions for you..
Best regards,
Michael