Code Duplication    Length = 6-10 lines in 2 locations

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

@@ 3038-3047 (lines=10) @@
3035
            }
3036
3037
            // if the student has specified a course we a add a link to that course
3038
            if ($item['course'] <> "") {
3039
                $url = api_get_path(
3040
                        WEB_CODE_PATH
3041
                    )."admin/agenda.php?cidReq=".urlencode(
3042
                        $item['course']
3043
                    )."&day=$day&month=$month&year=$year#$day"; // RH  //Patrick Cool: to highlight the relevant agenda item
3044
                $course_link = "<a href=\"$url\" title=\"".$item['course']."\">".$item['course']."</a>";
3045
            } else {
3046
                $course_link = "";
3047
            }
3048
            // Creating the array that will be returned. If we have week or month view we have an array with the date as the key
3049
            // if we have a day_view we use a half hour as index => key 33 = 16h30
3050
            if ($type !== "day_view") {
@@ 3148-3153 (lines=6) @@
3145
            }
3146
3147
            // if the student has specified a course we a add a link to that course
3148
            if ($item['course'] <> "") {
3149
                $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
3150
                $course_link = "<a href=\"$url\" title=\"".$item['course']."\">".$item['course']."</a>";
3151
            } else {
3152
                $course_link = "";
3153
            }
3154
            // Creating the array that will be returned. If we have week or month view we have an array with the date as the key
3155
            // if we have a day_view we use a half hour as index => key 33 = 16h30
3156
            if ($type !== "day_view") {