Code Duplication    Length = 4-6 lines in 3 locations

main/inc/lib/tracking.lib.php 3 locations

@@ 748-753 (lines=6) @@
745
                                        Display::return_icon('view_less_stats.gif', get_lang('HideAllAttempts')),
746
                                        api_get_self() . '?action=stats' . $my_url_suffix . '&session_id=' . $session_id . '&lp_item_id=' . $my_id
747
                                    );
748
                                } else {
749
                                    $correct_test_link = Display::url(
750
                                        Display::return_icon('view_more_stats.gif', get_lang('ShowAllAttemptsByExercise')),
751
                                        api_get_self() . '?action=stats&extend_attempt=1' . $my_url_suffix . '&session_id=' . $session_id . '&lp_item_id=' . $my_id
752
                                    );
753
                                }
754
                            }
755
                        }
756
@@ 4362-4365 (lines=4) @@
4359
                    ) {
4360
                        $html .= '<a href="#">';
4361
                        $html .= Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4362
                    } else {
4363
                        $html .= '<a href="'.api_get_self().'?course='.$course_code.$extra_params.'">';
4364
                        $html .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4365
                    }
4366
                    $html .= '</a>';
4367
                    $html .= '</td></tr>';
4368
                }
@@ 4696-4699 (lines=4) @@
4693
                    if ($course_code == $courseCodeFromGet && $_GET['session_id'] == $session_id_from_get) {
4694
                        $details = '<a href="#">';
4695
                        $details .=Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4696
                    } else {
4697
                        $details = '<a href="'.api_get_self().'?course='.$course_code.'&session_id='.$session_id_from_get.$extra_params.'">';
4698
                        $details .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4699
                    }
4700
                    $details .= '</a>';
4701
                    $html .= Display::tag('td', $details, array('align'=>'center'));
4702
                    $html .= '</tr>';