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: {sectionid} {sectionname} variables does not return ID and NAME when used in section. #288

Open marko-markopet opened 6 months ago

marko-markopet commented 6 months ago

Prerequisites

What happened?

  1. {sectionid} {sectionname} does not return ID and NAME when used in section.
  2. {ifinsection} used in section returns "nothing".
  3. {ifnotinsection} used in section returns True.

What do you think should have happened?

I expected that variables {sectionid} or {sectionname} will return ID or Name when I use them anywhere in a section. I have trayed {sectionid} and {sectionname} in section and announcement with different results. /see pics/

Steps to reproduce

  1. Login as Course developer (specify user role)
  2. Write section description with {sectionid} and {sectionname}. Mark show description.
  3. Prewiew couse
  4. No SectionID and SectionName viewed in description.
  5. With Label activity = same result.

Screenshots

Used in section:

image

Used in announcement

image

Moodle version

3.11.15

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: Windows 10 Pro Client Web Browser: Edge Server Operating System: Linux Server Webserver: dont know Server PHP: dont know

Code of Conduct

michael-milette commented 6 months ago

HI @marko-markopet

The tags you mentioned were meant to be use inside a course activities, not in a label on the course main page. The documentation could be clearer about this. As far as I can see, the tags work correctly inside a course activity or resource.

If you have other requirements, please provide provide a description of your requirements and details of how you will actually be using it.

Best regards,

Michael

marko-markopet commented 6 months ago

HI @marko-markopet

The tags you mentioned were meant to be use inside a course activities, not in a label on the course main page. The documentation could be clearer about this. As far as I can see, the tags work correctly inside a course activity or resource.

If you have other requirements, please provide provide a description of your requirements and details of how you will actually be using it.

Best regards,

Michael

Thank you for quick response. It is a big shame that tags do not work in Label. I need to repeat same text on end of each section, with name of current section. I used Label, because I know only this way how to place simple text on end of section. Best regards,

Marko