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: Tag is left behind when using in Custom Menu Items #280

Closed sahinakkaya closed 7 months ago

sahinakkaya commented 7 months ago

Prerequisites

What happened?

This might be same as #278 but I am reporting it anyway to make us understand the situation better. When I use {ifminmanager}{/ifminmanager} in Custom Menu Items (Site Administration -> Appearance -> Theme Settings -> Custom Menu Items), the navbar is not correctly populated. If I am logged in as manager, the link will be something like <moodle-url>/<actual-endpoint>{/ifminmanager} If I am not logged in it will not even rendered correctly

What do you think should have happened?

I expected the link to be rendered correctly in all situations and go to the correct location when clicked.

Steps to reproduce

  1. Go to Site Administration -> Appearance -> Theme Settings -> Custom Menu Items
  2. Add a custom menu item like: {ifminmanager}My Custom Link|/my/courses{/ifminmanager}
  3. Save changes
  4. Custom link should be visible at the top but it will render incorrectly and/or the link will be wrong.

Screenshots

Logged in as Manager, the link is incorrect:

resim

Logged out. The link is incorrect and the menu item is not rendered correctly

resim

Moodle version

Moodle 4.2.3+ (Build: 20231020)

Installed Moodle UI Language packs.

If other language(s), please specify

No response

Workaround

No response

Additional information

No response

System information

No response

Code of Conduct

michael-milette commented 7 months ago

Sorry for the delay in following up with you. I could not reproduce this issue.

Best regards,

Michael

sahinakkaya commented 7 months ago

It was my fault, the answer was in README. I missed it because there was more than one section about custom menus.

michael-milette commented 7 months ago

Hi @sahinakkaya ,

Good point. Perhaps I should consider merging them to make it easier to find information. Thank you for the feedback.

Best regards,

Michael