Code Duplication    Length = 4-5 lines in 3 locations

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

@@ 3463-3466 (lines=4) @@
3460
        if (!empty($params['subtitle'])) {
3461
            $html .= '<small>' . $params['subtitle'] . '</small>';
3462
        }
3463
        if (!empty($params['teachers'])) {
3464
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Teacher'), array(),
3465
                    ICON_SIZE_TINY) . $params['teachers'] . '</h5>';
3466
        }
3467
        if (!empty($params['coaches'])) {
3468
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Coach'), array(),
3469
                    ICON_SIZE_TINY) . $params['coaches'] . '</h5>';
@@ 3467-3470 (lines=4) @@
3464
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Teacher'), array(),
3465
                    ICON_SIZE_TINY) . $params['teachers'] . '</h5>';
3466
        }
3467
        if (!empty($params['coaches'])) {
3468
            $html .= '<h5 class="teacher">' . Display::return_icon('teacher.png', get_lang('Coach'), array(),
3469
                    ICON_SIZE_TINY) . $params['coaches'] . '</h5>';
3470
        }
3471
3472
        $html .= '</div>';
3473
        $params['right_actions'] = isset($params['right_actions']) ? $params['right_actions'] : null;
@@ 3523-3527 (lines=5) @@
3520
        if (!empty($params['subtitle'])) {
3521
            $html .= '<div class="subtitle-session">' . $params['subtitle'] . '</div>';
3522
        }
3523
        if (!empty($params['teachers'])) {
3524
            $html .= '<h5 class="course-items-session">' .
3525
                    Display::return_icon('teacher.png', get_lang('Teacher'), array(), ICON_SIZE_TINY) .
3526
                $params['teachers'] . '</h5>';
3527
        }
3528
        if (!empty($params['coaches'])) {
3529
            $coaches = '';
3530
            if (is_array($params['coaches'])) {