Code Duplication    Length = 6-10 lines in 2 locations

main/inc/lib/agenda.lib.php 2 locations

@@ 2971-2980 (lines=10) @@
2968
            }
2969
2970
            // if the student has specified a course we a add a link to that course
2971
            if ($item['course'] <> "") {
2972
                $url = api_get_path(
2973
                        WEB_CODE_PATH
2974
                    )."admin/agenda.php?cidReq=".urlencode(
2975
                        $item['course']
2976
                    )."&day=$day&month=$month&year=$year#$day"; // RH  //Patrick Cool: to highlight the relevant agenda item
2977
                $course_link = "<a href=\"$url\" title=\"".$item['course']."\">".$item['course']."</a>";
2978
            } else {
2979
                $course_link = "";
2980
            }
2981
            // Creating the array that will be returned. If we have week or month view we have an array with the date as the key
2982
            // if we have a day_view we use a half hour as index => key 33 = 16h30
2983
            if ($type !== "day_view") {
@@ 3081-3086 (lines=6) @@
3078
            }
3079
3080
            // if the student has specified a course we a add a link to that course
3081
            if ($item['course'] <> "") {
3082
                $url = api_get_path(WEB_CODE_PATH)."calendar/agenda.php?cidReq=".urlencode($item['course'])."&day=$day&month=$month&year=$year#$day"; // RH  //Patrick Cool: to highlight the relevant agenda item
3083
                $course_link = "<a href=\"$url\" title=\"".$item['course']."\">".$item['course']."</a>";
3084
            } else {
3085
                $course_link = "";
3086
            }
3087
            // Creating the array that will be returned. If we have week or month view we have an array with the date as the key
3088
            // if we have a day_view we use a half hour as index => key 33 = 16h30
3089
            if ($type !== "day_view") {