michael-milette / moodle-filter_filtercodes

FilterCodes filter for Moodle enables content creators to easily customize and personalize course and site content using plain text tags (no HTML). For premium support, contact us at https://www.tngconsulting.ca/contact
https://moodle.org/plugins/filter_filtercodes
GNU General Public License v3.0
30 stars 42 forks source link

Bug: Filtering is not occurring for Questionnaire's 'Advanced Settings' #259

Closed Kevin-Hipwell closed 11 months ago

Kevin-Hipwell commented 1 year ago

Prerequisites

What happened?

Filtering is not occurring for Questionnaire activity's 'Advanced Settings' tab 'Additional Info' setting.

What do you think should have happened?

I expected to see {firstname} being replaced with 'Admin' for Additional Info' setting.

Steps to reproduce

Screenshots

No response

Moodle version

Moodle 4.1.3 (Build: 20230424)

Installed Moodle UI Language packs.

If other language(s), please specify

No response

Workaround

No response

Additional information

No response

System information

Client Device type: (Desktop) Client Operating System: (Linux) Client Web Browser: (Chrome) Server Operating System: (Linux) Server Webserver: (Apache) Server PHP: (7.4.3)

Code of Conduct

michael-milette commented 11 months ago

HI @Kevin-Hipwell ,

Thank you for taking the time to report this issue. This issue not only affects FilterCodes but any plain text tags including multi-language tags like Multi-language Content (v2) found at https://moodle.org/plugins/filter_multilang2. It would therefore be really help many people in addition to yourself to get this fixed.

However, this is not an issue with the FilterCodes plugin but with the Questionnaire plugin. I recommend that you contact the developer of the Questionnaire plugin, Mike Churchward, and submit a request to have the output of that field pass through Moodle filters. You can find a link to the bug tracker for the Questionnaire plugin by going to https://moodle.org/plugins/mod_questionnaire and clicking on the "Bug Tracker" link.

I am sure he already knows about it and that this is just a small oversight but it may be helpful to point him to the Moodle Output API documentation at https://docs.moodle.org/dev/Output_functions, specifically the format_text() and format_string() functions. Moodle filters only work if content is passed though these functions as the content is being displayed.

If Mike Churchward doesn't have time to work on this right now and you are in a hurry to get the Questionnaire plugin fixed, contact me for paid support through my website at https://www.tngconsulting.ca.

I am closing this ticket for now as there is nothing more that I can do. If the problem persists after Mike fixes the Questionnaire plugin, please feel free to re-open this ticket and I will be happy to work on this further with you.

Best regards,

Michael Milette