mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
Fixed activity blocks for social format and site format so that they
- display icon properly when moving items - display custom icons (eg on resources)
This commit is contained in:
parent
a844bc045d
commit
facf75c18c
blocks
@ -49,8 +49,8 @@ class CourseBlock_site_main_menu extends MoodleBlock {
|
||||
$editbuttons = '';
|
||||
|
||||
if ($ismoving) {
|
||||
$this->content->items[] = ' <img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11">';
|
||||
$this->content->icons[] = $USER->activitycopyname.' (<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true">'.$strcancel.'</a>)';
|
||||
$this->content->icons[] = ' <img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11">';
|
||||
$this->content->items[] = $USER->activitycopyname.' (<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true">'.$strcancel.'</a>)';
|
||||
}
|
||||
|
||||
if (!empty($section->sequence)) {
|
||||
@ -92,6 +92,11 @@ class CourseBlock_site_main_menu extends MoodleBlock {
|
||||
} else {
|
||||
$extra = '';
|
||||
}
|
||||
if (!empty($modinfo[$modnumber]->icon)) {
|
||||
$icon = $CFG->pixpath.'/'.urldecode($modinfo[$modnumber]->icon);
|
||||
} else {
|
||||
$icon = $CFG->modpixpath.'/'.$mod->modname.'/icon.gif';
|
||||
}
|
||||
|
||||
if ($mod->modname == 'label') {
|
||||
$this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons;
|
||||
@ -99,7 +104,7 @@ class CourseBlock_site_main_menu extends MoodleBlock {
|
||||
} else {
|
||||
$this->content->items[] = '<a title="'.$mod->modfullname.'" '.$linkcss.' '.$extra.
|
||||
' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.$instancename.'</a>'.$editbuttons;
|
||||
$this->content->icons[] = '<img src="'.$CFG->modpixpath.'/'.$mod->modname.'/icon.gif" height="16" width="16" alt="'.$mod->modfullname.'">';
|
||||
$this->content->icons[] = '<img src="'.$icon.'" height="16" width="16" alt="'.$mod->modfullname.'">';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,8 +46,8 @@ class CourseBlock_social_activities extends MoodleBlock {
|
||||
$editbuttons = '';
|
||||
|
||||
if ($ismoving) {
|
||||
$this->content->items[] = ' <img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11">';
|
||||
$this->content->icons[] = $USER->activitycopyname.' (<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true">'.$strcancel.'</a>)';
|
||||
$this->content->icons[] = ' <img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11">';
|
||||
$this->content->items[] = $USER->activitycopyname.' (<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true">'.$strcancel.'</a>)';
|
||||
}
|
||||
|
||||
if (!empty($section->sequence)) {
|
||||
@ -89,6 +89,11 @@ class CourseBlock_social_activities extends MoodleBlock {
|
||||
} else {
|
||||
$extra = '';
|
||||
}
|
||||
if (!empty($modinfo[$modnumber]->icon)) {
|
||||
$icon = $CFG->pixpath.'/'.urldecode($modinfo[$modnumber]->icon);
|
||||
} else {
|
||||
$icon = $CFG->modpixpath.'/'.$mod->modname.'/icon.gif';
|
||||
}
|
||||
|
||||
if ($mod->modname == 'label') {
|
||||
$this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons;
|
||||
@ -96,7 +101,7 @@ class CourseBlock_social_activities extends MoodleBlock {
|
||||
} else {
|
||||
$this->content->items[] = '<a title="'.$mod->modfullname.'" '.$linkcss.' '.$extra.
|
||||
' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.$instancename.'</a>'.$editbuttons;
|
||||
$this->content->icons[] = '<img src="'.$CFG->modpixpath.'/'.$mod->modname.'/icon.gif" height="16" width="16" alt="'.$mod->modfullname.'">';
|
||||
$this->content->icons[] = '<img src="'.$icon.'" height="16" width="16" alt="'.$mod->modfullname.'">';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user