Closed acquaalta closed 9 months ago
Hi @acquaalta ,
Thank you for your suggestions.
With regards to renaming the tag. What you are suggesting makes sense to me however, doing this could break many existing implementations so I cannot justify the change.
With regards to an {ifvisible}, you requested the new tag but have not told me how you intend to use it. Please provide an actual scenario where you will use such a new tag.
Thank you again for ontrinuting your suggestions. I look forward to your reply.
Best regards,
Michael Milette
Hi @acquaalta ,
Thank you for your suggestions.
With regards to renaming the tag. What you are suggesting makes sense to me however, doing this could break many existing implementations so I cannot justify the change.
You're completely right. When I thought about the requested change I didn't think that accepting it would break all the existing implementations of the filter tag. Maybe adding it as a some kind of an alias to the original tag? But I guess it's not important enough and it would also mean one functional tag with duplicate names, so I guess I'll have to forget about it :-)
With regards to an {ifvisible}, you requested the new tag but have not told me how you intend to use it. Please provide an actual scenario where you will use such a new tag.
The actual scenario is the following: Moodle doesn't offer yet an indication of the course visibility status, so teachers have a hard time knowing if they view/edit a course that is not visible to the students. BTW, I know that such functionality is on the way: https://tracker.moodle.org/browse/MDL-77184 But looking at the mock-up screens, I think it's still not clear enough.
So let's say you want to create a mechanism that displays a custom text with special formatting, that indicate if the course is visible or not. Using the {ifnotvisible} tag you can create a text that would be displayed when the course is hidden from students, but what if you want to display a text that indicates that the course is visible? Then you need the opposite tag, which to the best of my knowledge doesn't exist yet. UX-wise, some people like me would prefer display a text in both cases, when the course is not visible and also when it is visible.
Please consider it :-)
Thank you again for contributing your suggestions. I look forward to your reply.
Best regards,
Michael Milette
Hi @acquaalta ,
Great news! A new {ifvisible}PUT YOUR CONTENT HERE{/ifvisible} tag has been added to FilterCodes but only here on GitHub. As requested, it should display context between the tags. Note that this will only work inside a course. This is the opposite logic of the existing {ifnotvisible}{/ifnotvisible} tags.
If you would be so kind, I would be thankful if you could try it out and let me know if it works for you. If it is all good, this new feature will be included in the official upcoming release of FilterCodes on Moodle.org.
Looking forward to hearing from you.
Best regards,
Michael Milette
Hi @acquaalta ,
As it has been a couple of months since I last heard from you, I will assume that this is all working correctly. This will be included in the upcoming release on moodle.org within the next few weeks.
Thanks again for the Feature Request.
Best regards,
Michael
Hi @michael-milette,
Prerequisites
Feature Request - The User Story
Hi, There FilterCodes already has the {ifnotvisible} tag. But: 1) It's not clear enough from the tag name that it deals with the course-level visibility. 2) It seems that there isn't an opposite {ifvisible} tag.
Therefore, I suggest: 1) The change the name of the {ifnotvisible} tag to {ifcoursenotvisible} 2) Adding a new tag: {ifcoursevisible}
I think the following code is relevant:
Please consider implementing these changes in the official plugin. Thanks even just for reading and considering it.
And thanks also for this great plugin :-)
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)?
No
Code of Conduct