From 1e2e5ea0d368db2a56870c6c7a0805710f5ca8a6 Mon Sep 17 00:00:00 2001 From: Peter Dias Date: Wed, 20 Jan 2021 11:49:40 +0800 Subject: [PATCH] MDL-70339 mod_lti: Use the convenience function to get the right img --- mod/lti/locallib.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mod/lti/locallib.php b/mod/lti/locallib.php index 12969d188ff..6b1a16aef58 100644 --- a/mod/lti/locallib.php +++ b/mod/lti/locallib.php @@ -2374,11 +2374,7 @@ function lti_get_configured_types($courseid, $sectionreturn = 0) { $type->help = clean_param($trimmeddescription, PARAM_NOTAGS); $type->helplink = get_string('modulename_shortcut_link', 'lti'); } - if (empty($ltitype->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->icon = html_writer::empty_tag('img', ['src' => get_tool_type_icon_url($ltitype), 'alt' => '', 'class' => 'icon']); $type->link = new moodle_url('/course/modedit.php', array('add' => 'lti', 'return' => 0, 'course' => $courseid, 'sr' => $sectionreturn, 'typeid' => $ltitype->id)); $types[] = $type;