Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 365-370 (lines=6) @@
362
                // These links are only visible by the course manager.
363
                unset($lnk);
364
                if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
365
                    if ($tool['visibility'] == '1' || $tool['name'] == TOOL_TRACKING) {
366
                        $link['name'] = Display::returnFontAwesomeIcon('minus');
367
                        $link['title'] = get_lang('Deactivate');
368
                        $link['cmd'] = 'hide=yes';
369
                        $lnk[] = $link;
370
                    }
371
372
                    if ($course_tool_category == TOOL_PUBLIC_BUT_HIDDEN) {
373
                        //$link['name'] = Display::return_icon('add.gif', get_lang('Activate'));
@@ 404-409 (lines=6) @@
401
                            $lnk[] = $link;
402
                        }
403
                    }
404
                    if ($tool['visibility'] == 0 && $tool['added_tool'] == 0) {
405
                        $link['name'] = Display::returnFontAwesomeIcon('trash');
406
                        $link['title'] = get_lang('Remove');
407
                        $link['cmd'] = 'remove=yes';
408
                        $lnk[] = $link;
409
                    }
410
                }
411
                if (is_array($lnk)) {
412
                    $html .= '<div class="pull-right">';