Code Duplication    Length = 3-13 lines in 8 locations

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

@@ 196-199 (lines=4) @@
193
							Display::return_icon('invisible.png', get_lang('Show'), array(), ICON_SIZE_SMALL).'</a>';
194
						$attendance[2] = '<span class="muted">'.$attendance[2].'</span>';
195
					}
196
					if ($allowDelete === 'true') {
197
						$actions .= '<a href="index.php?' . api_get_cidreq() . '&action=attendance_delete&attendance_id=' . $attendance[0]. '">' .
198
							Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
199
					}
200
				} else {
201
					$is_locked_attendance = self::is_locked_attendance($attendance[0]);
202
					if ($is_locked_attendance) {
@@ 217-220 (lines=4) @@
214
								Display::return_icon('invisible.png', get_lang('Show'), array(), ICON_SIZE_SMALL).'</a>';
215
							$attendance[2] = '<span class="muted">'.$attendance[2].'</span>';
216
						}
217
						if ($allowDelete === 'true') {
218
							$actions .= ' <a href="index.php?' . api_get_cidreq() . '&action=attendance_delete&attendance_id=' . $attendance[0].'">' .
219
								Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
220
						}
221
					}
222
				}
223

main/mySpace/myStudents.php 1 location

@@ 656-658 (lines=3) @@
653
            $title = '';
654
            if (empty($sessionId)) {
655
                $title = Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_SMALL).' '.get_lang('Courses');
656
            } else {
657
                $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session?' ('.$date_session.')':'');
658
            }
659
660
            // Courses
661
            echo '<h3>'.$title.'</h3>';

main/gradebook/lib/fe/displaygradebook.php 1 location

@@ 51-54 (lines=4) @@
48
49
                $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&print=&selecteval=' . $evalobj->get_id() . '" target="_blank">' .
50
                    Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM) . '</a>';
51
            } else {
52
                $header .= '<a href="gradebook_view_result.php?'.api_get_cidreq().'&selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' .
53
                    Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>';
54
            }
55
            $header .= '</div>';
56
        }
57

main/announcements/announcements.php 1 location

@@ 609-612 (lines=4) @@
606
    if (in_array($action, array('add', 'modify', 'view'))) {
607
        $actionsLeft .= "<a href='".api_get_self()."?".api_get_cidreq()."&origin=".$origin."'>".
608
            Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM)."</a>";
609
    } else {
610
        $actionsLeft .= "<a href='".api_get_self()."?".api_get_cidreq()."&action=add&origin=".$origin."'>".
611
            Display::return_icon('new_announce.png', get_lang('AddAnnouncement'), '', ICON_SIZE_MEDIUM)."</a>";
612
    }
613
    $show_actions = true;
614
} else {
615
    if (in_array($action, array('view'))) {

main/inc/lib/document.lib.php 3 locations

@@ 5236-5239 (lines=4) @@
5233
                            Display::return_icon($forcedownload_icon, get_lang('Download'), array(), ICON_SIZE_SMALL) . '</a>';
5234
                    }
5235
                }
5236
            } else {
5237
                $force_download_html = ($size == 0) ? '' : '<a href="' . $forcedownload_link . '" style="float:right"' . $prevent_multiple_click . '>' .
5238
                    Display::return_icon($forcedownload_icon, get_lang('Download'), array(), ICON_SIZE_SMALL) . '</a>';
5239
            }
5240
5241
            // Copy files to users myfiles
5242
            if (api_get_setting('allow_social_tool') == 'true' &&
@@ 5607-5610 (lines=4) @@
5604
            //Edit button
5605
            if (in_array($path, DocumentManager::get_system_folders())) {
5606
                $modify_icons = Display::return_icon('edit_na.png', get_lang('Modify'), '', ICON_SIZE_SMALL);
5607
            } elseif ($is_certificate_mode ) {
5608
                // gradebook category doesn't seem to be taken into account
5609
                $modify_icons = '<a href="edit_document.php?' . api_get_cidreq() . '&amp;id=' . $document_id . '&curdirpath=/certificates">' . Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>';
5610
            } else {
5611
                if (api_get_session_id()) {
5612
                    if ($document_data['session_id'] == api_get_session_id()) {
5613
                        if ($extension == 'svg' && api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') {
@@ 5714-5726 (lines=13) @@
5711
            // @TODO: add prompt to select a format target
5712
            if (in_array($path, DocumentManager::get_system_folders())) {
5713
                // nothing to do
5714
            } else {
5715
                if ($usePpt2lp && $formatType) {
5716
                    $modify_icons .= '&nbsp;<a class="convertAction" href="#" ' .
5717
                        'data-documentId = ' . $document_id .
5718
                        ' data-formatType = ' . $formatType . '>' .
5719
                        Display::return_icon(
5720
                            'convert.png',
5721
                            get_lang('Convert'),
5722
                            array(),
5723
                            ICON_SIZE_SMALL
5724
                        ) . '</a>';
5725
                }
5726
            }
5727
        }
5728
5729
        if ($type == 'file' && ($extension == 'html' || $extension == 'htm')) {