Code Duplication    Length = 4-4 lines in 2 locations

main/inc/lib/CourseChatUtils.php 2 locations

@@ 121-124 (lines=4) @@
118
        $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
119
        $basepath_chat = '/chat_files';
120
121
        if (!$this->groupId) {
122
            $group_info = GroupManager::get_group_properties($this->groupId);
123
            $basepath_chat = $group_info['directory'] . '/chat_files';
124
        }
125
126
        $chat_path = $document_path . $basepath_chat . '/';
127
@@ 1555-1558 (lines=4) @@
1552
        $basepath_chat = '/chat_files';
1553
        $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
1554
1555
        if ($this->groupId) {
1556
            $group_info = GroupManager:: get_group_properties($this->groupId);
1557
            $basepath_chat = $group_info['directory'] . '/chat_files';
1558
        }
1559
1560
        $chat_path = $document_path . $basepath_chat . '/';
1561