Code Duplication    Length = 4-4 lines in 2 locations

main/inc/lib/CourseChatUtils.php 2 locations

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