MDL-70339 mod_lti: Use the convenience function to get the right img

This commit is contained in:
Peter Dias 2021-01-20 11:49:40 +08:00
parent c381757f2a
commit 1e2e5ea0d3

View file

@ -2374,11 +2374,7 @@ function lti_get_configured_types($courseid, $sectionreturn = 0) {
$type->help = clean_param($trimmeddescription, PARAM_NOTAGS); $type->help = clean_param($trimmeddescription, PARAM_NOTAGS);
$type->helplink = get_string('modulename_shortcut_link', 'lti'); $type->helplink = get_string('modulename_shortcut_link', 'lti');
} }
if (empty($ltitype->icon)) { $type->icon = html_writer::empty_tag('img', ['src' => get_tool_type_icon_url($ltitype), 'alt' => '', 'class' => 'icon']);
$type->icon = $OUTPUT->pix_icon('icon', '', 'lti', array('class' => 'icon'));
} else {
$type->icon = html_writer::empty_tag('img', array('src' => $ltitype->icon, 'alt' => '', 'class' => 'icon'));
}
$type->link = new moodle_url('/course/modedit.php', array('add' => 'lti', 'return' => 0, 'course' => $courseid, $type->link = new moodle_url('/course/modedit.php', array('add' => 'lti', 'return' => 0, 'course' => $courseid,
'sr' => $sectionreturn, 'typeid' => $ltitype->id)); 'sr' => $sectionreturn, 'typeid' => $ltitype->id));
$types[] = $type; $types[] = $type;