Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 760-770 (lines=11) @@
757
                if ($is_allowed_to_edit) {
758
                    if (empty($session_id)) {
759
                        if (isset($tool['id'])) {
760
                            if ($tool['visibility'] == '1' && $toolAdmin != '1') {
761
                                $link['name'] = Display::return_icon(
762
                                    'visible.png',
763
                                    get_lang('Deactivate'),
764
                                    array('id' => 'linktool_'.$tool['id']),
765
                                    ICON_SIZE_SMALL,
766
                                    false
767
                                );
768
                                $link['cmd'] = 'hide=yes';
769
                                $lnk[] = $link;
770
                            }
771
                            if ($tool['visibility'] == '0' && $toolAdmin != '1') {
772
                                $link['name'] = Display::return_icon(
773
                                    'invisible.png',
@@ 771-781 (lines=11) @@
768
                                $link['cmd'] = 'hide=yes';
769
                                $lnk[] = $link;
770
                            }
771
                            if ($tool['visibility'] == '0' && $toolAdmin != '1') {
772
                                $link['name'] = Display::return_icon(
773
                                    'invisible.png',
774
                                    get_lang('Activate'),
775
                                    array('id' => 'linktool_'.$tool['id']),
776
                                    ICON_SIZE_SMALL,
777
                                    false
778
                                );
779
                                $link['cmd'] = 'restore=yes';
780
                                $lnk[] = $link;
781
                            }
782
                        }
783
                    }
784
                    if (!empty($tool['adminlink'])) {