How to Remove Icons in Moodle
This arrticle is about removing Icons from the course formats page (when displaying the course page) for Moodle 1.7. The code referenced can be found at xref.moodle.org.
The code for displaying the image is on lines 1163-1167:
echo ‘<img src="’.$icon.‘"’.
’ class=“activityicon” alt=“‘.$mod->modfullname.’” />‘.
’ <a title="’.$mod->modfullname.‘" ’.$linkcss.’ ‘.$extra.
’ href="’.$CFG->wwwroot.‘/mod/’.$mod->modname.‘/view.php?id=’.$mod->id.‘“>’.
$instancename.‘</a>’;
The definition for $icon is on lines 1142-1146:
if (!empty($modinfo[$modnumber]->icon)) {
$icon = “$CFG->pixpath/”.urldecode($modinfo[$modnumber]->icon);
} else {
$icon = “$CFG->modpixpath/$mod->modname/icon.gif”;
}
One approach is to point $icon to a spacer image if icons are disabled. Although this loads an unecessary image, it is a simple a quick solution. In addition line 1149 already loads a spacer image with a function call to print_spacer().