Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 808-818 (lines=11) @@
805
                if ($is_allowed_to_edit) {
806
                    if (empty($session_id)) {
807
                        if (isset($tool['id'])) {
808
                            if ($tool['visibility'] == '1' && $toolAdmin != '1') {
809
                                $link['name'] = Display::return_icon(
810
                                    'visible.png',
811
                                    get_lang('Deactivate'),
812
                                    array('id' => 'linktool_'.$tool['id']),
813
                                    ICON_SIZE_SMALL,
814
                                    false
815
                                );
816
                                $link['cmd'] = 'hide=yes';
817
                                $lnk[] = $link;
818
                            }
819
                            if ($tool['visibility'] == '0' && $toolAdmin != '1') {
820
                                $link['name'] = Display::return_icon(
821
                                    'invisible.png',
@@ 819-829 (lines=11) @@
816
                                $link['cmd'] = 'hide=yes';
817
                                $lnk[] = $link;
818
                            }
819
                            if ($tool['visibility'] == '0' && $toolAdmin != '1') {
820
                                $link['name'] = Display::return_icon(
821
                                    'invisible.png',
822
                                    get_lang('Activate'),
823
                                    array('id' => 'linktool_'.$tool['id']),
824
                                    ICON_SIZE_SMALL,
825
                                    false
826
                                );
827
                                $link['cmd'] = 'restore=yes';
828
                                $lnk[] = $link;
829
                            }
830
                        }
831
                    } elseif ($allowEditionInSession) {
832
                        $criteria = [