Code Duplication    Length = 8-11 lines in 2 locations

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

@@ 648-655 (lines=8) @@
645
646
                    $courses_shown++;
647
                    $courses_list_string .= "<li>";
648
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
649
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)
650
                        || ($user_identified && array_key_exists($course['code'], $courses_of_user)
651
                            && $course['visibility'] != COURSE_VISIBILITY_CLOSED)
652
                        || $courses_of_user[$course['code']]['status'] == '1'
653
                        || api_is_platform_admin()) {
654
                            $courses_list_string .= '<a href="'.$web_course_path.$course['directory'].'/">';
655
                        }
656
                    $courses_list_string .= $course['title'];
657
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
658
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)

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

@@ 786-796 (lines=11) @@
783
                    //
784
                    $courses_shown++;
785
                    $courses_list_string .= "<li>\n";
786
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
787
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)
788
                        || ($user_identified && key_exists(
789
                            $course['code'],
790
                            $courses_of_user
791
                        ) && $course['visibility'] != COURSE_VISIBILITY_CLOSED)
792
                        || $courses_of_user[$course['code']]['status'] == '1'
793
                        || api_is_platform_admin()
794
                    ) {
795
                        $courses_list_string .= '<a href="'.$web_course_path.$course['directory'].'/">';
796
                    }
797
                    $courses_list_string .= $course['title'];
798
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
799
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)