if (!empty($customicon)) {
if (substr($customicon, 0, 4) === 'mod/') {
list($modname, $iconname) = explode('/', substr($customicon, 4), 2);
- $icon = $OUTPUT->mod_icon_url($iconname, $modname);
+ $icon = $OUTPUT->mod_icon_url(str_replace(array('.gif', '.png'), '', $iconname), $modname);
} else {
- $icon = $OUTPUT->old_icon_url($customicon);
+ $icon = $OUTPUT->old_icon_url(str_replace(array('.gif', '.png'), '', $customicon));
}
} else {
$icon = "" . $OUTPUT->mod_icon_url('icon', $mod->modname) . "";
}
function displaydir($file_info) {
- global $CFG;
+ global $CFG, $OUTPUT;
$children = $file_info->get_children();
$parent_info = $file_info->get_parent();
}
}
public function item_html($extraargs = array()){
- global $CFG;
- $pixpath = $CFG->pixpath;
+ global $CFG, $OUTPUT;
$str = $extraargs['str'];
$category = $this->item;
if (count($this->parentlist->records)!=1){ // don't allow delete if this is the last category in this context.
$item .= '<a title="' . $str->delete . '" href="'.$this->parentlist->pageurl->out_action(array('delete'=>$this->id)).'">
- <img src="' . $pixpath . '/t/delete.gif" class="iconsmall" alt="' .$str->delete. '" /></a>';
+ <img src="' . $OUTPUT->old_icon_url('t/delete.gif') . '" class="iconsmall" alt="' .$str->delete. '" /></a>';
}
return $item;
class question_category_object {
var $str;
- var $pixpath;
/**
* Nested lists to display categories.
*
$this->str->cancel = get_string('cancel');
$this->str->editcategories = get_string('editcategories', 'quiz');
$this->str->page = get_string('page');
- $this->pixpath = $CFG->pixpath;
$this->pageurl = $pageurl;