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

Feature Request: ifincohort enhancements #253

Closed MURBASLMS closed 1 year ago

MURBASLMS commented 1 year ago

Prerequisites

Feature Request - The User Story

hello! great plugin. I was having a fiddle about with the ifincohort and hit a problem because the cohorts i needed to use have a dash in them eg MJ-ACCA for majors. These are pulled in automatically, though i could get them altered i wondered if it would be possible to allow a dash with this functionality?

Related with this i wondered if also possible to have ifnotincohort option as well as being able to have multiple cohort ids/names in the parameter?

moon on a stick maybe, just thought i'd ask. All the best, Mike

Screenshots / Mock-ups

No response

Alterative you have considered

No response

Additional information

No response

Planning on submitting a solution in a pull request (PR)?

Maybe

Code of Conduct

michael-milette commented 1 year ago

Hi @MURBASLMS ,

Thank you for suggesting the support of a dash/hyphen in cohort IDs. A fix for this issue has been added and is now available but only here on GitHub. If you would be so kind, I would really appreciate it if you could test this fix and let me know if it works for you. If it does, I will include it in the next release of FilterCodes on Moodle.org.

Best regards,

Michael

MURBASLMS commented 1 year ago

that's brilliant thank you!

Just tested and it looks ok to me, added a condition with a cohort named "ASIAN-ST" and it displayed text as expected.

michael-milette commented 1 year ago

Thank you for testing it @MURBASLMS ,

This change was integrated into FilterCodes release v2.3.6 on May 7, 2023. Closing this ticket.

Best regards,

Michael