Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 842-852 (lines=11) @@
839
                        if ($toolObj) {
840
                            $visibility = $toolObj->getVisibility();
841
                            switch ($visibility) {
842
                                case '0':
843
                                    $link['name'] = Display::return_icon(
844
                                        'invisible.png',
845
                                        get_lang('Activate'),
846
                                        array('id' => 'linktool_'.$tool['id']),
847
                                        ICON_SIZE_SMALL,
848
                                        false
849
                                    );
850
                                    $link['cmd'] = 'restore=yes';
851
                                    $lnk[] = $link;
852
                                    break;
853
                                case '1':
854
                                    $link['name'] = Display::return_icon(
855
                                        'visible.png',
@@ 853-863 (lines=11) @@
850
                                    $link['cmd'] = 'restore=yes';
851
                                    $lnk[] = $link;
852
                                    break;
853
                                case '1':
854
                                    $link['name'] = Display::return_icon(
855
                                        'visible.png',
856
                                        get_lang('Deactivate'),
857
                                        array('id' => 'linktool_'.$tool['id']),
858
                                        ICON_SIZE_SMALL,
859
                                        false
860
                                    );
861
                                    $link['cmd'] = 'hide=yes';
862
                                    $lnk[] = $link;
863
                                    break;
864
                            }
865
                        } else {
866
                            $link['name'] = Display::return_icon(