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
32 stars 43 forks source link

Feature request: Support other tags within {chart progressbar x Title text} #218

Closed philipsiwinski closed 1 year ago

philipsiwinski commented 2 years ago

Hi @michael-milette, many thanks for contributing this great plugin.

I tried to use the new {chart progressbar x Title text} tag which works very well. However, I was wondering if it would be possible to add support for other tags within this tag.

I imagine something like that: {chart progressbar {profile_field_percentagenumber} {profile_field_titletext}}

What do you think?

Thanks a lot :)

michael-milette commented 2 years ago

Hi @philipsiwinski ,

It depends. Is {profilefield...} the only tag that you would need?

Can you describe to me what you are trying to do and how you get your values into the profile fields?

philipsiwinski commented 2 years ago

Thank you @michael-milette, yes I would only need this kind of tags {profilefield...}. In relation with the other issue I opened, I'm trying to display a progress bar (to show the global progress accross multiple courses for learners who are not enroled in the same courses) in a text block on the default dashboard for all users.

In order to have the progress bar display each learner's own progress, I imagine storing these progress values in custom profile fields. For each learner, the values of these profile fields will be set and the regularly updated by an external system via web services or by local custom plugins. Did I explain the scenario well enough? Thanks

michael-milette commented 2 years ago

Thanks for the information @philipsiwinski . I will see what I can do for you.

michael-milette commented 1 year ago

Hi @philipsiwinski ,

Thank you again for contributing your suggestion.

You asked for it? You got it! You can now use the {profilefield...} tag inside the {chart} tag. Please be sure that you have numbers only in the profile field, without the % symbol beside it. Valid range is from 0 to 100.

This enhancement is currently available here on GitHub. If you would be so kind, I would really appreciate it if you could try it out as I would like to include this in the upcoming release of FilterCodes on Moodle.org within the next few days.

Best regards,

Michael