Code Duplication    Length = 10-10 lines in 2 locations

main/inc/lib/document.lib.php 1 location

@@ 580-589 (lines=10) @@
577
        $condition_session .= self::getSessionFolderFilters($originalPath, $sessionId);
578
579
        $sharedCondition = null;
580
        if ($originalPath == '/shared_folder') {
581
            $students = CourseManager::get_user_list_from_course_code($_course['code'], $sessionId);
582
            if (!empty($students)) {
583
                $conditionList = array();
584
                foreach ($students as $studentId => $studentInfo) {
585
                    $conditionList[] = '/shared_folder/sf_user_' . $studentInfo['user_id'];
586
                }
587
                $sharedCondition .= ' AND docs.path IN ("' . implode('","', $conditionList) . '")';
588
            }
589
        }
590
591
        $sql = "SELECT
592
                    docs.id,

main/admin/course_edit.php 1 location

@@ 280-289 (lines=10) @@
277
    $visual_code_is_used = false;
278
279
    $warn = get_lang('TheFollowingCoursesAlreadyUseThisVisualCode');
280
    if (!empty($visual_code)) {
281
        $list = CourseManager::get_courses_info_from_visual_code($visual_code);
282
        foreach ($list as $course_temp) {
283
            if ($course_temp['code'] != $course_code) {
284
                $visual_code_is_used = true;
285
                $warn .= ' ' . $course_temp['title'] . ' (' . $course_temp['code'] . '),';
286
            }
287
        }
288
        $warn = substr($warn, 0, -1);
289
    }
290
291
    $teachers = isset($course['course_teachers']) ? $course['course_teachers'] : '';
292
    $title = $course['title'];