Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 382-384 (lines=3) @@
379
                            $lnk[] = $link;
380
                        }
381
                    }
382
                    if ($tool['adminlink']) {
383
                        $html .= '<a href="'.$tool['adminlink'].'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>';
384
                    }
385
                }
386
                if (api_is_platform_admin() && !api_is_coach()) {
387
                    if ($tool['visibility'] == 2) {
@@ 761-763 (lines=3) @@
758
                            }
759
                        }
760
                    }
761
                    if (!empty($tool['adminlink'])) {
762
                        $item['extra'] = '<a href="'.$tool['adminlink'].'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>';
763
                    }
764
                }
765
766
                // Both checks are necessary as is_platform_admin doesn't take student view into account