Code Duplication    Length = 4-4 lines in 2 locations

main/inc/lib/CourseChatUtils.php 2 locations

@@ 108-111 (lines=4) @@
105
        $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
106
        $basepath_chat = '/chat_files';
107
108
        if (!$this->groupId) {
109
            $group_info = GroupManager::get_group_properties($this->groupId);
110
            $basepath_chat = $group_info['directory'] . '/chat_files';
111
        }
112
113
        $chat_path = $document_path . $basepath_chat . '/';
114
@@ 1542-1545 (lines=4) @@
1539
        $basepath_chat = '/chat_files';
1540
        $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
1541
1542
        if ($this->groupId) {
1543
            $group_info = GroupManager:: get_group_properties($this->groupId);
1544
            $basepath_chat = $group_info['directory'] . '/chat_files';
1545
        }
1546
1547
        $chat_path = $document_path . $basepath_chat . '/';
1548