mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-19690 fix some breakage.
This commit is contained in:
parent
5ef444007d
commit
42d5737a94
3 changed files with 5 additions and 8 deletions
|
@ -1333,9 +1333,9 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
|||
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) . "";
|
||||
|
|
|
@ -207,7 +207,7 @@ function print_cell($alignment='center', $text=' ', $class='') {
|
|||
}
|
||||
|
||||
function displaydir($file_info) {
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
$children = $file_info->get_children();
|
||||
$parent_info = $file_info->get_parent();
|
||||
|
|
|
@ -84,8 +84,7 @@ class question_category_list_item extends list_item {
|
|||
}
|
||||
}
|
||||
public function item_html($extraargs = array()){
|
||||
global $CFG;
|
||||
$pixpath = $CFG->pixpath;
|
||||
global $CFG, $OUTPUT;
|
||||
$str = $extraargs['str'];
|
||||
$category = $this->item;
|
||||
|
||||
|
@ -101,7 +100,7 @@ class question_category_list_item extends list_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;
|
||||
|
@ -118,7 +117,6 @@ class question_category_list_item extends list_item {
|
|||
class question_category_object {
|
||||
|
||||
var $str;
|
||||
var $pixpath;
|
||||
/**
|
||||
* Nested lists to display categories.
|
||||
*
|
||||
|
@ -173,7 +171,6 @@ class question_category_object {
|
|||
$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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue