mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-20787 removed mod_icon_url() completely
This commit is contained in:
parent
f44b10ed93
commit
683c01d2c8
@ -129,7 +129,7 @@
|
||||
foreach ($modulebyname as $modulename => $module) {
|
||||
|
||||
// took out hspace="\10\", because it does not validate. don't know what to replace with.
|
||||
$icon = "<img src=\"" . $OUTPUT->mod_icon_url('icon', $module->name) . "\" class=\"icon\" alt=\"\" />";
|
||||
$icon = "<img src=\"" . $OUTPUT->old_icon_url('icon', $module->name) . "\" class=\"icon\" alt=\"\" />";
|
||||
|
||||
$delete = "<a href=\"modules.php?delete=$module->name&sesskey=".sesskey()."\">$strdelete</a>";
|
||||
|
||||
|
@ -54,7 +54,7 @@ class block_activity_modules extends block_list {
|
||||
$this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('f/html') . '" class="icon" alt="" />';
|
||||
} else {
|
||||
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/mod/'.$modname.'/index.php?id='.$course->id.'">'.$modfullname.'</a>';
|
||||
$this->content->icons[] = '<img src="'.$OUTPUT->mod_icon_url('icon', $modname) . '" class="icon" alt="" />';
|
||||
$this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('icon', $modname) . '" class="icon" alt="" />';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ class block_site_main_menu extends block_list {
|
||||
if (!empty($cm->icon)) {
|
||||
$icon = $OUTPUT->old_icon_url($cm->icon);
|
||||
} else {
|
||||
$icon = $OUTPUT->mod_icon_url('icon', $cm->modname);
|
||||
$icon = $OUTPUT->old_icon_url('icon', $cm->modname);
|
||||
}
|
||||
$this->content->icons[] = '<img src="'.$icon.'" class="icon" alt="" />';
|
||||
}
|
||||
@ -124,7 +124,7 @@ class block_site_main_menu extends block_list {
|
||||
if (!empty($modinfo->cms[$modnumber]->icon)) {
|
||||
$icon = $OUTPUT->old_icon_url($modinfo->cms[$modnumber]->icon);
|
||||
} else {
|
||||
$icon = $OUTPUT->mod_icon_url('icon', $mod->modname);
|
||||
$icon = $OUTPUT->old_icon_url('icon', $mod->modname);
|
||||
}
|
||||
|
||||
if ($mod->modname == 'label') {
|
||||
|
@ -54,7 +54,7 @@ class block_social_activities extends block_list {
|
||||
if (!empty($cm->icon)) {
|
||||
$icon = $OUTPUT->old_icon_url($cm->icon);
|
||||
} else {
|
||||
$icon = $OUTPUT->mod_icon_url('icon', $cm->modname);
|
||||
$icon = $OUTPUT->old_icon_url('icon', $cm->modname);
|
||||
}
|
||||
$this->content->icons[] = '<img src="'.$icon.'" class="icon" alt="" />';
|
||||
}
|
||||
@ -133,7 +133,7 @@ class block_social_activities extends block_list {
|
||||
if (!empty($modinfo->cms[$modnumber]->icon)) {
|
||||
$icon = $OUTPUT->old_icon_url($modinfo->cms[$modnumber]->icon);
|
||||
} else {
|
||||
$icon = $OUTPUT->mod_icon_url('icon', $mod->modname);
|
||||
$icon = $OUTPUT->old_icon_url('icon', $mod->modname);
|
||||
}
|
||||
|
||||
if ($mod->modname == 'label') {
|
||||
|
@ -262,7 +262,7 @@ class blog_entry {
|
||||
|
||||
$associcon = new moodle_action_icon();
|
||||
$associcon->link->url = new moodle_url($CFG->wwwroot.'/mod/'.$modname.'/view.php', array('id' => $modinfo->id));
|
||||
$associcon->image->src = $OUTPUT->mod_icon_url('icon', $modname);
|
||||
$associcon->image->src = $OUTPUT->old_icon_url('icon', $modname);
|
||||
$associcon->linktext = $DB->get_field($modname, 'name', array('id' => $modinfo->instance));
|
||||
$assocstr .= $OUTPUT->action_icon($associcon);
|
||||
$assocstr .= ', ';
|
||||
|
@ -247,7 +247,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
|
||||
}
|
||||
$event = $events[$eventid];
|
||||
if(!empty($event->modulename)) {
|
||||
$popupicon = $OUTPUT->mod_icon_url('icon', $event->modulename) . '';
|
||||
$popupicon = $OUTPUT->old_icon_url('icon', $event->modulename) . '';
|
||||
$popupalt = $event->modulename;
|
||||
|
||||
} else if ($event->courseid == SITEID) { // Site event
|
||||
@ -505,7 +505,7 @@ function calendar_add_event_metadata($event) {
|
||||
|
||||
$modulename = get_string('modulename', $event->modulename);
|
||||
$eventtype = get_string($event->eventtype, $event->modulename);
|
||||
$icon = $OUTPUT->mod_icon_url('icon', $event->modulename) . '';
|
||||
$icon = $OUTPUT->old_icon_url('icon', $event->modulename) . '';
|
||||
|
||||
$event->icon = '<img height="16" width="16" src="'.$icon.'" alt="'.$eventtype.'" title="'.$modulename.'" style="vertical-align: middle;" />';
|
||||
$event->referer = '<a href="'.$CFG->wwwroot.'/mod/'.$event->modulename.'/view.php?id='.$module->id.'">'.$event->name.'</a>';
|
||||
|
@ -620,7 +620,7 @@
|
||||
$helpicon->page = 'mods';
|
||||
$helpicon->text = $pageheading;
|
||||
$helpicon->module = $module->name;
|
||||
echo $OUTPUT->heading_with_help($helpicon, $OUTPUT->mod_icon_url('icon', $module->name));
|
||||
echo $OUTPUT->heading_with_help($helpicon, $OUTPUT->old_icon_url('icon', $module->name));
|
||||
|
||||
$mform->display();
|
||||
|
||||
|
@ -246,7 +246,7 @@ if (!empty($activities)) {
|
||||
$name = format_string($cm->name);
|
||||
$modfullname = $modnames[$cm->modname];
|
||||
|
||||
$image = "<img src=\"" . $OUTPUT->mod_icon_url('icon', $cm->modname) . "\" class=\"icon\" alt=\"$modfullname\" />";
|
||||
$image = "<img src=\"" . $OUTPUT->old_icon_url('icon', $cm->modname) . "\" class=\"icon\" alt=\"$modfullname\" />";
|
||||
echo "<h4>$image $modfullname".
|
||||
" <a href=\"$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id\" $linkformat>$name</a></h4>";
|
||||
}
|
||||
|
@ -107,7 +107,7 @@
|
||||
$activitycell = new html_table_cell();
|
||||
$activitycell->add_class('activity');
|
||||
|
||||
$activityicon = html_image::make($OUTPUT->mod_icon_url('icon', $cm->modname));
|
||||
$activityicon = html_image::make($OUTPUT->old_icon_url('icon', $cm->modname));
|
||||
$activityicon->add_class('icon');
|
||||
$activityicon->alt = $modulename;
|
||||
|
||||
|
@ -198,7 +198,7 @@ foreach($activities as $activity) {
|
||||
print '<th scope="col" class="'.$activity->datepassedclass.'">'.
|
||||
'<a href="'.$CFG->wwwroot.'/mod/'.$activity->modname.
|
||||
'/view.php?id='.$activity->id.'">'.
|
||||
'<img src="'.$OUTPUT->mod_icon_url('icon', $activity->modname).'/icon.gif" alt="'.
|
||||
'<img src="'.$OUTPUT->old_icon_url('icon', $activity->modname).'/icon.gif" alt="'.
|
||||
get_string('modulename',$activity->modname).'" /> <span class="completion-activityname">'.
|
||||
format_string($activity->name).'</span></a>';
|
||||
if($activity->completionexpected) {
|
||||
|
@ -367,7 +367,7 @@ echo $OUTPUT->footer();
|
||||
function print_outline_row($mod, $instance, $result) {
|
||||
global $OUTPUT;
|
||||
|
||||
$image = "<img src=\"" . $OUTPUT->mod_icon_url('icon', $mod->modname) . "\" class=\"icon\" alt=\"$mod->modfullname\" />";
|
||||
$image = "<img src=\"" . $OUTPUT->old_icon_url('icon', $mod->modname) . "\" class=\"icon\" alt=\"$mod->modfullname\" />";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td valign=\"top\">$image</td>";
|
||||
|
@ -1245,7 +1245,7 @@ class grade_structure {
|
||||
|
||||
} else if ($element['object']->itemtype == 'mod') {
|
||||
$strmodname = get_string('modulename', $element['object']->itemmodule);
|
||||
return '<img src="'.$OUTPUT->mod_icon_url('icon',
|
||||
return '<img src="'.$OUTPUT->old_icon_url('icon',
|
||||
$element['object']->itemmodule) . '" ' .
|
||||
'class="icon itemicon" title="' .s($strmodname).
|
||||
'" alt="' .s($strmodname).'"/>';
|
||||
|
@ -1092,7 +1092,7 @@ class global_navigation extends navigation_node {
|
||||
$icon = null;
|
||||
if (!in_array($module->modname, $resources)) {
|
||||
if ($module->icon=='') {
|
||||
$icon = $OUTPUT->mod_icon_url('icon', $module->modname);
|
||||
$icon = $OUTPUT->old_icon_url('icon', $module->modname);
|
||||
}
|
||||
$url = new moodle_url($CFG->wwwroot.'/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
|
||||
$type = navigation_node::TYPE_ACTIVITY;
|
||||
@ -1154,7 +1154,7 @@ class global_navigation extends navigation_node {
|
||||
$icon = null;
|
||||
if (!in_array($module->modname, $resources)) {
|
||||
if ($module->icon=='') {
|
||||
$icon = $OUTPUT->mod_icon_url('icon', $module->modname);
|
||||
$icon = $OUTPUT->old_icon_url('icon', $module->modname);
|
||||
}
|
||||
$url = new moodle_url($CFG->wwwroot.'/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
|
||||
$type = navigation_node::TYPE_ACTIVITY;
|
||||
@ -2026,7 +2026,7 @@ class limited_global_navigation extends global_navigation {
|
||||
$icon = null;
|
||||
if (!in_array($module->modname, $resources)) {
|
||||
if ($module->icon=='') {
|
||||
$icon = $OUTPUT->mod_icon_url('icon', $module->modname);
|
||||
$icon = $OUTPUT->old_icon_url('icon', $module->modname);
|
||||
}
|
||||
$url = new moodle_url($CFG->wwwroot.'/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
|
||||
$type = navigation_node::TYPE_ACTIVITY;
|
||||
|
@ -155,12 +155,6 @@ class renderer_base {
|
||||
return $url->out(false, array(), $escaped);
|
||||
}
|
||||
|
||||
/** OBSOLETED: to be removed soon */
|
||||
public function mod_icon_url($iconname, $component, $escaped=true) {
|
||||
$url = $this->page->theme->image_url($iconname, $component);
|
||||
return $url->out(false, array(), $escaped);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the moodle_url for an image
|
||||
*
|
||||
|
@ -2427,7 +2427,7 @@ function navmenulist($course, $sections, $modinfo, $strsection, $strjumpto, $wid
|
||||
$class = 'activity '.$mod->modname;
|
||||
$class .= ($cmid == $mod->id) ? ' selected' : '';
|
||||
$menu[] = '<li class="'.$class.'">'.
|
||||
'<img src="'.$OUTPUT->mod_icon_url('icon', $mod->modname) . '" alt="" />'.
|
||||
'<img src="'.$OUTPUT->old_icon_url('icon', $mod->modname) . '" alt="" />'.
|
||||
'<a href="'.$CFG->wwwroot.'/mod/'.$url.'">'.$mod->name.'</a></li>';
|
||||
}
|
||||
|
||||
|
@ -2897,7 +2897,7 @@ function assignment_print_recent_mod_activity($activity, $courseid, $detail, $mo
|
||||
if ($detail) {
|
||||
$modname = $modnames[$activity->type];
|
||||
echo '<div class="title">';
|
||||
echo "<img src=\"" . $OUTPUT->mod_icon_url('icon', 'assignment') . "\" ".
|
||||
echo "<img src=\"" . $OUTPUT->old_icon_url('icon', 'assignment') . "\" ".
|
||||
"class=\"icon\" alt=\"$modname\">";
|
||||
echo "<a href=\"$CFG->wwwroot/mod/assignment/view.php?id={$activity->cmid}\">{$activity->name}</a>";
|
||||
echo '</div>';
|
||||
|
@ -536,8 +536,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
$result->toc .= "\t</ul>\n";
|
||||
if ($scorm->hidetoc == 0) {
|
||||
$result->toc .= $PAGE->requires->data_for_js('scormdata', array(
|
||||
'plusicon' => $OUTPUT->mod_icon_url('pix/plus', 'scorm'),
|
||||
'minusicon' => $OUTPUT->mod_icon_url('pix/minus', 'scorm')))->asap();
|
||||
'plusicon' => $OUTPUT->old_icon_url('pix/plus', 'scorm'),
|
||||
'minusicon' => $OUTPUT->old_icon_url('pix/minus', 'scorm')))->asap();
|
||||
$result->toc .= $PAGE->requires->js('lib/cookies.js')->asap();
|
||||
$result->toc .= $PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js')->asap();
|
||||
}
|
||||
|
@ -318,8 +318,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
$result->toc .= "\t</ul>\n";
|
||||
if ($scorm->hidetoc == 0) {
|
||||
$PAGE->requires->data_for_js('scormdata', array(
|
||||
'plusicon' => $OUTPUT->mod_icon_url('pix/plus', 'scorm'),
|
||||
'minusicon' => $OUTPUT->mod_icon_url('pix/minus', 'scorm')));
|
||||
'plusicon' => $OUTPUT->old_icon_url('pix/plus', 'scorm'),
|
||||
'minusicon' => $OUTPUT->old_icon_url('pix/minus', 'scorm')));
|
||||
$PAGE->requires->js('lib/cookies.js');
|
||||
$PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js');
|
||||
}
|
||||
|
@ -209,8 +209,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
$result->toc .= "\t</ul>\n";
|
||||
if ($scorm->hidetoc == 0) {
|
||||
$PAGE->requires->data_for_js('scormdata', array(
|
||||
'plusicon' => $OUTPUT->mod_icon_url('pix/plus', 'scorm'),
|
||||
'minusicon' => $OUTPUT->mod_icon_url('pix/minus', 'scorm')));
|
||||
'plusicon' => $OUTPUT->old_icon_url('pix/plus', 'scorm'),
|
||||
'minusicon' => $OUTPUT->old_icon_url('pix/minus', 'scorm')));
|
||||
$PAGE->requires->js('lib/cookies.js');
|
||||
$PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user