Code Duplication    Length = 4-5 lines in 2 locations

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

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