Code Duplication    Length = 6-9 lines in 2 locations

main/exercise/exercise.php 1 location

@@ 1142-1147 (lines=6) @@
1139
1140
                $item .= Display::tag('td', $attemptText);
1141
1142
                if ($isDrhOfCourse) {
1143
                    $actions ='<a href="hotpotatoes_exercise_report.php?'.api_get_cidreq().'&path='.$path.'">'.
1144
                        Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>';
1145
1146
                    $item .= Display::tag('td', $actions, array('class' => 'td_actions'));
1147
                }
1148
                $tableRows[] = Display::tag('tr', $item);
1149
            }
1150
        }

main/inc/lib/document.lib.php 1 location

@@ 5363-5371 (lines=9) @@
5360
                api_get_setting('users_copy_files') === 'true'
5361
            ) {
5362
                $copy_myfiles_link = ($filetype == 'file') ? api_get_self() . '?' . $courseParams . '&action=copytomyfiles&id=' . $document_data['id'] : api_get_self() . '?' . $courseParams;
5363
                if ($filetype == 'file') {
5364
                    $copy_to_myfiles = '<a href="' . $copy_myfiles_link . '" style="float:right"' . $prevent_multiple_click . '>' .
5365
                        Display::return_icon('briefcase.png', get_lang('CopyToMyFiles'), array(), ICON_SIZE_SMALL) . '&nbsp;&nbsp;</a>';
5366
5367
                    if (api_get_setting('allow_my_files') === 'false') {
5368
                        $copy_to_myfiles = '';
5369
                    }
5370
                }
5371
            }
5372
5373
            $pdf_icon = '';
5374
            $extension = pathinfo($path, PATHINFO_EXTENSION);