Displaying icons + text in activities

Displaying icons + text in activities

by Guillaume Cat -
Number of replies: 9
Hello,

I've just installed Moodle 4.3 with the adaptable theme.

The activity icons that used to display well are no longer displayed, and the text, instead of going to the end of the page, goes to the line after only a few characters.

Here's a screenshot


Would you know what to do to change this display?

Thank you very much.
Guillaume

Average of ratings: -
In reply to Guillaume Cat

Re: Displaying icons + text in activities

by Carlos Contreras -

Hi Guillaume:

The problem is that the Responsive Theme is not compatible with versions starting with 4.2. 

The developer has not updated it and it seems that he has no intention of doing so in the short term. 


I solved it by adding custom CSS code. The images are taken from a previous version that I saved

.activity-item .activity-grid {

    display: flex!important;

}

.flex-column {

    flex-grow: 1;

}

.modtype_forum .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/forum/icon.svg);

}

.modtype_assign  .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/assign/icon.svg);

}

.modtype_attendanceregister  .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/attendance/icon.svg);

}

.modtype_page  .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/page/icon.svg);

}

.modtype_resource  .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/resource/icon.svg);

}

.modtype_quiz  .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/quiz/icon.svg);

}

.modtype_quiz  .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/quiz/icon.svg);

}

.modtype_url  .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/url/icon.svg);

}

.modtype_scorm  .courseicon .activityicon{

content: url(/theme/adaptable/pix_plugins/mod/scorm/icon.svg);



Hope this can help you

Carlos.

Average of ratings: Useful (1)
In reply to Carlos Contreras

Re: Displaying icons + text in activities

by Guillaume Cat -
Hello Carlos,

Thank you very much for your reply.

The text worked fine. For the icons, it gave white images.



Do you have any idea how to do this?

Thank you very much for your help.
Guillaume
In reply to Guillaume Cat

Re: Displaying icons + text in activities

by Carlos Contreras -
For the images you must unzip the icons that I have attached in my first message inside the directory "/theme/adaptable/pix_plugins/" or put your own design

Average of ratings: Useful (2)
In reply to Carlos Contreras

Re: Displaying icons + text in activities

by Guillaume Cat -
Hello Carlos,

Thank you for your reply.

I followed your instructions, but unfortunately it didn't work. I still have "empty" icons.

Do you have any other ideas?

In any case, thanks for your help
In reply to Guillaume Cat

Re: Displaying icons + text in activities

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
For M4.3, delete this file -> https://github.com/gjbarnard/moodle-theme_adaptable/blob/master/templates/core_courseformat/local/content/cm/cmname.mustache to fix the issue. No need to mess around with images.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Displaying icons + text in activities

by Mariano Acciardi -
Hi Gareth,

I'm upgrading to 4.3.2 (Build: 20231222) our large university site. i've installed last available version of theme (403.0.1
2023111800) I had the problems cited in this thread with icons and names.

I made three changes you recommend us:
a) Add custom css to theme
b) Unrar all icons from your file inside pix_plugins/
c) delete cmname.mustache

And it works ! Thanks a lot!!

I have 2 questions, a) When I must upgrade the theme to another version, these changes are lost? b) The deletion of file cmname.mustache may break something?

Thanks for your great support.

Best Regards
Mariano
In reply to Mariano Acciardi

Re: Displaying icons + text in activities

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Mariano,

Just follow the instructions in the Readme.md file when you want to upgrade. Text based setting values (such as custom CSS) aren't often normally lost during upgrades.

The deletion of cmname.mustache could break something, but I was the one to tell you to do so, therefore a 95% (or so - I'm only human) chance that something wouldn't be broken as a result.

Gareth
In reply to Carlos Contreras

Re: Displaying icons + text in activities

by Mariano Acciardi -
Hi Carlos,

I've made all the changes you told us, and it seemed to work. But navigating with other courses, in some sections it works, and in others not. For example I'attach images from two courses, one using format topcol, and the other uses format onetopic. In both courses in some sections works and in other not. For example, in header section not works, but inside a topic it works.

In themes as boost we don' t have any problem. But in our university we have a lot of customisations made on adaptable theme, and is not easy to change the theme we use for the last 5 years.

Do you think we can add something else to the custom css code you make? Any other idea?

Best regards
Mariano
Attachment EjemplosOkyNook.png