Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 431-435 (lines=5) @@
428
                    $html .= '<div class="pull-right">';
429
                    $html .= '<div class="btn-options">';
430
                    $html .= '<div class="btn-group btn-group-sm" role="group">';
431
                    foreach ($lnk as & $this_link) {
432
                        if (!isset($tool['adminlink'])) {
433
                            $html .= '<a class="btn btn-default" title='.$this_link['title'].' href="'.api_get_self().'?'.api_get_cidreq().'&amp;id='.$tool['id'].'&amp;'.$this_link['cmd'].'">'.$this_link['name'].'</a>';
434
                        }
435
                    }
436
                    $html .= '</div>';
437
                    $html .= '</div>';
438
                    $html .= '</div>';
@@ 889-894 (lines=6) @@
886
887
                $item['visibility'] = null;
888
                if (isset($lnk) && is_array($lnk)) {
889
                    foreach ($lnk as $this_link) {
890
                        if (empty($tool['adminlink'])) {
891
                            $item['visibility'] .= '<a class="make_visible_and_invisible" href="'.api_get_self().'?'.api_get_cidreq().'&id='.$tool['iid'].'&'.$this_link['cmd'].'">'.
892
                                $this_link['name'].'</a>';
893
                        }
894
                    }
895
                } else {
896
                    $item['visibility'] .= '';
897
                }