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: {courseimage} within the HTML editor #261

Closed brunohcury closed 11 months ago

brunohcury commented 11 months ago

Prerequisites

Feature Request - The User Story

Hello Michael,

Is there a way to use the {courseimage} tag within atto's HTML editor? My idea is to insert an HTML block in the course with the background course cover image as in the attached example.

Thank you very much

Att Bruno Cury

html

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)?

Yes

Code of Conduct

michael-milette commented 11 months ago

Hi @brunohcury ,

Thank you for your suggestion.

I created a new "{courseimage-url}" tag for you. This should enable you to use it in CSS as a background image by adding something like the following in the source code view of the editor:

<div style="background-image: url('{courseimage-url');">
    <!-- Your content here -->
</div>

The new tag is currently only available here on GitHub. I would be thankful if you would be so kind as to try it and let me know if it works for you. If it meets your needs, I will include the new tag in the next release on Moodle.org.

Best regards,

Michael Milette

brunohcury commented 11 months ago

Hello Michael, It is perfect! I have no words to thank you. Thank you very much capa

michael-milette commented 11 months ago

You're very welcome @brunohcury . Looks very nice. Would you mind sharing your HTML and styles that you used in order to achieve this?

brunohcury commented 11 months ago

Yes of course!

{coursename} {mygroups} {firstname}, seu progresso no curso está {courseprogress} {courseprogressbar} {coursecontacts}

I remain available Att. Bruno Cury

brunohcury commented 11 months ago

contatos

brunohcury commented 11 months ago

Thank you very much!

michael-milette commented 11 months ago

Thank you for sharing @brunohcury .

Tip: You can probably put all that code in a FilterCodes Global tag. That way, you would just need to add one tag to your course. And, if you ever need to change it in all your courses, you would simply need to change it in one place.

Best regards,

Michael