willianmano / moodle-theme_moove

A Moodle Boost child theme
GNU General Public License v3.0
171 stars 157 forks source link

Filters for frontpage items #390

Closed stefan-weber-think-modular closed 1 year ago

stefan-weber-think-modular commented 2 years ago

Filters like multilang are not working for frontpage items (marketingboxes, FAQ)

Reproduce In Moove settings for Frontpage, enter a marketingcontent with multilang text filters, eg {mlang en}Englisch text{mlang}{mlang fr}French text{mlang}{mlang other}Other text{mlang}

Expected behavior Filters should be applied and only the selected language should be displayed.

Your environment (please complete the following information):

Possible solution Change the output in /classes/util/settings.php, eg from

$templatecontext['marketingcontent'] = $this->marketingcontent;

to

$templatecontext['marketingcontent'] = format_text($this->marketingcontent);

This needs to be done for all text output settings.

willianmano commented 1 year ago

@stefan-weber-think-modular This is already implemented. Thanks for reply

stefan-weber-think-modular commented 1 year ago

@willianmano please also fix it for FAQ - /classes/util/settings.php starting at line 221, change from

$templatecontext['faq'][] = [
                    'id' => $i,
                    'question' => $this->$faqquestion,
                    'answer' => $this->$faqanswer
                ];

to

$templatecontext['faq'][] = [
                    'id' => $i,
                    'question' => format_text($this->$faqquestion),
                    'answer' => format_text($this->$faqanswer)
                ];
willianmano commented 1 year ago

@stefan-weber-think-modular Thanks for reporting. I fixed it.