Code Duplication    Length = 5-5 lines in 4 locations

main/inc/lib/banner.lib.php 4 locations

@@ 266-270 (lines=5) @@
263
264
    if (api_get_user_id() && !api_is_anonymous()) {
265
        // My Courses
266
        if (api_get_setting('show_tabs', 'my_courses') == 'true') {
267
            $navigation['mycourses'] = $possible_tabs['mycourses'];
268
        } else {
269
            $menu_navigation['mycourses'] = $possible_tabs['mycourses'];
270
        }
271
272
        // My Profile
273
        if (api_get_setting('show_tabs', 'my_profile') == 'true' &&
@@ 282-286 (lines=5) @@
279
        }
280
281
        // My Agenda
282
        if (api_get_setting('show_tabs', 'my_agenda') == 'true') {
283
            $navigation['myagenda'] = $possible_tabs['myagenda'];
284
        } else {
285
            $menu_navigation['myagenda'] = $possible_tabs['myagenda'];
286
        }
287
288
        // Gradebook
289
        if (api_get_setting('gradebook_enable') == 'true') {
@@ 290-294 (lines=5) @@
287
288
        // Gradebook
289
        if (api_get_setting('gradebook_enable') == 'true') {
290
            if (api_get_setting('show_tabs', 'my_gradebook') == 'true') {
291
                $navigation['mygradebook'] = $possible_tabs['mygradebook'];
292
            } else {
293
                $menu_navigation['mygradebook'] = $possible_tabs['mygradebook'];
294
            }
295
        }
296
297
        // Reporting
@@ 332-336 (lines=5) @@
329
330
        // Administration
331
        if (api_is_platform_admin(true)) {
332
            if (api_get_setting('show_tabs', 'platform_administration') == 'true') {
333
                $navigation['platform_admin'] = $possible_tabs['platform_admin'];
334
            } else {
335
                $menu_navigation['platform_admin'] = $possible_tabs['platform_admin'];
336
            }
337
        }
338
339
		// Reports