Code Duplication    Length = 4-4 lines in 2 locations

main/inc/lib/CourseChatUtils.php 2 locations

@@ 119-122 (lines=4) @@
116
        $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
117
        $basepath_chat = '/chat_files';
118
119
        if (!$this->groupId) {
120
            $group_info = GroupManager::get_group_properties($this->groupId);
121
            $basepath_chat = $group_info['directory'] . '/chat_files';
122
        }
123
124
        $chat_path = $document_path . $basepath_chat . '/';
125
@@ 1515-1518 (lines=4) @@
1512
        $basepath_chat = '/chat_files';
1513
        $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
1514
1515
        if ($this->groupId) {
1516
            $group_info = GroupManager:: get_group_properties($this->groupId);
1517
            $basepath_chat = $group_info['directory'] . '/chat_files';
1518
        }
1519
1520
        $chat_path = $document_path . $basepath_chat . '/';
1521