Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 2044-2054 (lines=11) @@
2041
                $list[] = $teacher_name;
2042
            }
2043
2044
            if (!empty($list)) {
2045
                if ($orderList === true){
2046
                    $html .= '<ul class="user-teacher">';
2047
                    foreach ($list as $teacher){
2048
                        $html .= Display::tag('li', Display::return_icon('teacher.png', $teacher, null, ICON_SIZE_TINY) . ' ' . $teacher);
2049
                    }
2050
                    $html .= '</ul>';
2051
                } else {
2052
                    $html .= array_to_string($list, $separator);
2053
                }
2054
            }
2055
        }
2056
2057
        return $html;
@@ 2145-2156 (lines=12) @@
2142
        }
2143
        $coaches_to_string = null;
2144
2145
        if (!empty($course_coachs)) {
2146
            if ($orderList === true){
2147
                $html .= '<ul class="user-coachs">';
2148
                    foreach ($course_coachs as $coachs){
2149
                        $html .= Display::tag('li', Display::return_icon('teacher.png', $coachs, null, ICON_SIZE_TINY) . ' ' . $coachs);
2150
                    }
2151
                $html .= '</ul>';
2152
            } else {
2153
                $coaches_to_string = array_to_string($course_coachs, $separator);
2154
            }
2155
2156
        }
2157
2158
        return $html;
2159
    }