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 45 forks source link

{coursecontacts} Is it possible to at least remove blank lines? #195

Closed Alexandre-Scherbyna closed 2 years ago

Alexandre-Scherbyna commented 2 years ago

Unfortunately, {coursecontacts} has the same formatting as {courseteachers}. The line feed before each name and one blank line after each name. Here is a screenshot: https://www.screenpresso.com/=6Z6Qe Is it possible to at least remove blank lines?

michael-milette commented 2 years ago

Hi @Alexandre-Scherbyna ,

Please give the version 2.2.7 that I recently published here on GitHub a try. It should resolve your issue and adds a class called fc-coursecontacts which will enable you to customize the display using CSS.

This change is currently only available here on GitHub. If you could give it a try and get back to me, I would really appreciate it. If it works for you, it will be included in the next release of FilterCodes on Moodle.org, which will be coming out around the same time as Moodle 4.0.

Best regards,

Michael

Alexandre-Scherbyna commented 2 years ago

Hi Michael ! I have installed version 2.2.7. There the {coursecontacts} tag doesn't work: https://www.screenpresso.com/=Lwosb

michael-milette commented 2 years ago

Hi @Alexandre-Scherbyna ,

Where are you putting the {coursecontacts} tags? It only works within the context of a course. But even outside the course, it should still just remove the tag.

Also, what version of Moodle are you using exactly?

Please confirm that you have upgraded Moodle.

Please confirm that you have navigated to Site Administration > Notifications and completed the database upgrade after upgrading the plugin.

I tried it: image

In a page: image

In a block: image

In a label: image

I just uploaded a new version 2.2.8. However, the only changes I made were to fix the icons (were not appearing) and fixed the phone number fieldname.

Best regards,

Michael

Alexandre-Scherbyna commented 2 years ago

Hi Michael! Sorry, the tag was copied along with the span style. Here is the HTML code:

1111111{\coursecontacts<\/span>}22222222222{firstname}333333

I removed the span style and now the tag works. There are no empty lines! Thanks a lot!

I used versions 2.2.7 and 2.2.8. Moodle 3.11.

michael-milette commented 2 years ago

Glad to hear that you worked it out @Alexandre-Scherbyna . I appreciate you testing it out. I discovered the issue with the icons because of you. Thanks! :-)

Michael