Code Duplication    Length = 4-6 lines in 3 locations

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

@@ 3481-3484 (lines=4) @@
3478
        if (!empty($params['subtitle'])) {
3479
            $html .= '<small>' . $params['subtitle'] . '</small>';
3480
        }
3481
        if (!empty($params['teachers'])) {
3482
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Teacher'), array(),
3483
                    ICON_SIZE_TINY) . $params['teachers'] . '</h5>';
3484
        }
3485
        if (!empty($params['coaches'])) {
3486
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Coach'), array(),
3487
                    ICON_SIZE_TINY) . $params['coaches'] . '</h5>';
@@ 3485-3488 (lines=4) @@
3482
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Teacher'), array(),
3483
                    ICON_SIZE_TINY) . $params['teachers'] . '</h5>';
3484
        }
3485
        if (!empty($params['coaches'])) {
3486
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Coach'), array(),
3487
                    ICON_SIZE_TINY) . $params['coaches'] . '</h5>';
3488
        }
3489
3490
        $html .= '</div>';
3491
        $params['right_actions'] = isset($params['right_actions']) ? $params['right_actions'] : null;
@@ 6601-6606 (lines=6) @@
6598
        if (!empty($params['subtitle'])) {
6599
            $html .= '<div class="subtitle-session">'.$params['subtitle'].'</div>';
6600
        }
6601
        if (!empty($params['teachers'])) {
6602
            $teachers = $params['teachers'];
6603
            $html .= '<h5 class="course-items-session">'.
6604
                Display::return_icon(
6605
                    'teacher.png',
6606
                    get_lang('Teacher'),
6607
                    array(),
6608
                    ICON_SIZE_TINY
6609
                ).