Code Duplication    Length = 8-11 lines in 2 locations

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

@@ 413-420 (lines=8) @@
410
411
                    $courses_shown++;
412
                    $courses_list_string .= "<li>";
413
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
414
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)
415
                        || ($user_identified && array_key_exists($course['code'], $courses_of_user)
416
                            && $course['visibility'] != COURSE_VISIBILITY_CLOSED)
417
                        || $courses_of_user[$course['code']]['status'] == '1'
418
                        || api_is_platform_admin()) {
419
                            $courses_list_string .= '<a href="'.$web_course_path.$course['directory'].'/">';
420
                        }
421
                    $courses_list_string .= $course['title'];
422
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
423
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)

src/Chamilo/CoreBundle/Framework/PageController.php 1 location

@@ 526-536 (lines=11) @@
523
                    //
524
                    $courses_shown++;
525
                    $courses_list_string .= "<li>\n";
526
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
527
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)
528
                        || ($user_identified && key_exists(
529
                            $course['code'],
530
                            $courses_of_user
531
                        ) && $course['visibility'] != COURSE_VISIBILITY_CLOSED)
532
                        || $courses_of_user[$course['code']]['status'] == '1'
533
                        || api_is_platform_admin()
534
                    ) {
535
                        $courses_list_string .= '<a href="'.$web_course_path.$course['directory'].'/">';
536
                    }
537
                    $courses_list_string .= $course['title'];
538
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
539
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)