Code Duplication    Length = 4-5 lines in 2 locations

main/inc/lib/course_home.lib.php 2 locations

@@ 964-967 (lines=4) @@
961
                        $tool_name = $plugin_info['title'];
962
                    }
963
964
                    if (!file_exists(api_get_path(SYS_CODE_PATH).'img/'.$tool['image']) &&
965
                        !file_exists(api_get_path(SYS_CODE_PATH).'img/icons/64/'.$tool['image'])) {
966
                        $tool['image'] = 'plugins.png';
967
                    }
968
                    $tool_link_params['href'] = api_get_path(WEB_PLUGIN_PATH)
969
                        .$tool['original_link'].$qm_or_amp.api_get_cidreq();
970
                }
@@ 1423-1427 (lines=5) @@
1420
                        $tool_name = $plugin_info['title'];
1421
                    }*/
1422
1423
                    if (!file_exists(api_get_path(SYS_CODE_PATH).'img/'.$navigation_item['image']) &&
1424
                        !file_exists(api_get_path(SYS_CODE_PATH).'img/icons/'.ICON_SIZE_MEDIUM.'/'.$navigation_item['image'])
1425
                    ) {
1426
                        $navigation_item['image'] = 'plugins.png';
1427
                    }
1428
                    //$tool_link_params['href'] = api_get_path(WEB_PLUGIN_PATH).$navigation_item['link'].'?'.api_get_cidreq();
1429
                }
1430