In the other thread they say they're running Moodle 2.5.1, and I checked our 2.4 install and I see the correct header there, so maybe there's some other variable?
Looking at the code, it seems to scan through any HTML you've added to the HEAD section via settings in order to not overule any attempt to change this setting via meta tags, maybe that's the cause here?
https://github.com/moodle/moodle/blob/master/lib/weblib.php#L2031
David Scotson
Повідомлення, що надісла(ла)в David Scotson
You need to put the replacement icons inside the theme you intend to use so:
theme/essential/pix_plugin/mod/scorm/icon.png
theme/essential/pix_plugin/mod/forum/icon.png
theme/essential/pix_plugin/mod/scorm/icon.svg
theme/essential/pix_plugin/mod/forum/icon.svg
and so on. Or for clean:
theme/clean/pix_plugin/mod/scorm/icon.png
theme/clean/pix_plugin/mod/forum/icon.png
theme/clean/pix_plugin/mod/scorm/icon.svg
theme/clean/pix_plugin/mod/forum/icon.svg
I would have thought replacing them in core would have worked too, so it might just be a caching issue, but putting them in the theme is probably the 'right' way to do it.
theme/essential/pix_plugin/mod/scorm/icon.png
theme/essential/pix_plugin/mod/forum/icon.png
theme/essential/pix_plugin/mod/scorm/icon.svg
theme/essential/pix_plugin/mod/forum/icon.svg
and so on. Or for clean:
theme/clean/pix_plugin/mod/scorm/icon.png
theme/clean/pix_plugin/mod/forum/icon.png
theme/clean/pix_plugin/mod/scorm/icon.svg
theme/clean/pix_plugin/mod/forum/icon.svg
I would have thought replacing them in core would have worked too, so it might just be a caching issue, but putting them in the theme is probably the 'right' way to do it.
The line that writes out those icons is in a renderer, so you should be able to override it to some degree.
https://github.com/moodle/moodle/blob/master/course/renderer.php#L806-L808
However, from previous experience I've found that often these things are also defined in other places, e.g. if you drag'n'drop a file into a course it might try to create that same HTML via javascript, which you'll have a much harder time changing.
Another approach I've used in these situations is to use CSS to first hide the existing icons, then use CSS to add the font icon instead. Unfortunately CSS :before, which is a handy technique for doing this, doesn't apply to img tags, which is generally what you're trying to target.
What I've never tried but might be relevant here, is to use SVG icons as a source. I think you can download Font Awesome icons individually as SVG and PNG from http://icomoon.io/app/ so then you'd just have a bit of renaming to do.
I've attached an IcoMoon font icon (from their own set, not Font Awesome, they offer a few different sets to mix'n'match from) exported as a black PNG at 24 pixels.
https://github.com/moodle/moodle/blob/master/course/renderer.php#L806-L808
However, from previous experience I've found that often these things are also defined in other places, e.g. if you drag'n'drop a file into a course it might try to create that same HTML via javascript, which you'll have a much harder time changing.
Another approach I've used in these situations is to use CSS to first hide the existing icons, then use CSS to add the font icon instead. Unfortunately CSS :before, which is a handy technique for doing this, doesn't apply to img tags, which is generally what you're trying to target.
What I've never tried but might be relevant here, is to use SVG icons as a source. I think you can download Font Awesome icons individually as SVG and PNG from http://icomoon.io/app/ so then you'd just have a bit of renaming to do.
I've attached an IcoMoon font icon (from their own set, not Font Awesome, they offer a few different sets to mix'n'match from) exported as a black PNG at 24 pixels.
You were in the other thread when someone's question prompted me to look this up, but just in case you didn't see it there, the IcoMoon web app does all this quite neatly. Just export as "SVG" and it'll let you select a color and size and give you both the SVG and the PNG.
If you're using the Moodle SVG then you can upload them into the tool I believe (though I've not tried it) and use this system for recoloring the SVGs too.
If you're using the Moodle SVG then you can upload them into the tool I believe (though I've not tried it) and use this system for recoloring the SVGs too.
I originally prototyped it to do exactly this, but it's trickier than it looks because of interactions between the way Bootstrap does responsive design, and the way Moodle does RTL, accessability, javascript drag'n'drop of blocks (particulary to areas that currently don't have blocks) and probably a few other things.
As a result of that, I'm generally leaning towards solving all those (and a few other) problems at once by enforcing a max of two columns (and furthermore forcing the block column to remain on the same side).
It's possible that changes made to the grid system in Bootstrap 3 make this easier than it was before, but I've not fully investigated that avenue.
As a result of that, I'm generally leaning towards solving all those (and a few other) problems at once by enforcing a max of two columns (and furthermore forcing the block column to remain on the same side).
It's possible that changes made to the grid system in Bootstrap 3 make this easier than it was before, but I've not fully investigated that avenue.