Code Duplication    Length = 4-6 lines in 3 locations

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

@@ 3436-3439 (lines=4) @@
3433
        if (!empty($params['subtitle'])) {
3434
            $html .= '<small>' . $params['subtitle'] . '</small>';
3435
        }
3436
        if (!empty($params['teachers'])) {
3437
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Teacher'), array(),
3438
                    ICON_SIZE_TINY) . $params['teachers'] . '</h5>';
3439
        }
3440
        if (!empty($params['coaches'])) {
3441
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Coach'), array(),
3442
                    ICON_SIZE_TINY) . $params['coaches'] . '</h5>';
@@ 3440-3443 (lines=4) @@
3437
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Teacher'), array(),
3438
                    ICON_SIZE_TINY) . $params['teachers'] . '</h5>';
3439
        }
3440
        if (!empty($params['coaches'])) {
3441
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Coach'), array(),
3442
                    ICON_SIZE_TINY) . $params['coaches'] . '</h5>';
3443
        }
3444
3445
        $html .= '</div>';
3446
        $params['right_actions'] = isset($params['right_actions']) ? $params['right_actions'] : null;
@@ 3497-3502 (lines=6) @@
3494
        if (!empty($params['subtitle'])) {
3495
            $html .= '<div class="subtitle-session">' . $params['subtitle'] . '</div>';
3496
        }
3497
        if (!empty($params['teachers'])) {
3498
            $teachers = $params['teachers'];
3499
            $html .= '<h5 class="course-items-session">' .
3500
                    Display::return_icon('teacher.png', get_lang('Teacher'), array(), ICON_SIZE_TINY) .
3501
                $teachers.'</h5>';
3502
        }
3503
        if (!empty($params['coaches'])) {
3504
            $coaches = '';
3505
            if (is_array($params['coaches'])) {