Code Duplication    Length = 4-4 lines in 2 locations

main/inc/lib/CourseChatUtils.php 2 locations

@@ 101-104 (lines=4) @@
98
        $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
99
        $basepath_chat = '/chat_files';
100
101
        if (!$this->groupId) {
102
            $group_info = GroupManager::get_group_properties($this->groupId);
103
            $basepath_chat = $group_info['directory'] . '/chat_files';
104
        }
105
106
        $chat_path = $document_path . $basepath_chat . '/';
107
@@ 1535-1538 (lines=4) @@
1532
        $basepath_chat = '/chat_files';
1533
        $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
1534
1535
        if ($this->groupId) {
1536
            $group_info = GroupManager:: get_group_properties($this->groupId);
1537
            $basepath_chat = $group_info['directory'] . '/chat_files';
1538
        }
1539
1540
        $chat_path = $document_path . $basepath_chat . '/';
1541