Code Duplication    Length = 4-6 lines in 3 locations

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

@@ 751-756 (lines=6) @@
748
                                        Display::return_icon('view_less_stats.gif', get_lang('HideAllAttempts')),
749
                                        api_get_self() . '?action=stats' . $my_url_suffix . '&session_id=' . $session_id . '&lp_item_id=' . $my_id
750
                                    );
751
                                } else {
752
                                    $correct_test_link = Display::url(
753
                                        Display::return_icon('view_more_stats.gif', get_lang('ShowAllAttemptsByExercise')),
754
                                        api_get_self() . '?action=stats&extend_attempt=1' . $my_url_suffix . '&session_id=' . $session_id . '&lp_item_id=' . $my_id
755
                                    );
756
                                }
757
                            }
758
                        }
759
@@ 4395-4398 (lines=4) @@
4392
                    ) {
4393
                        $html .= '<a href="#">';
4394
                        $html .= Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4395
                    } else {
4396
                        $html .= '<a href="'.api_get_self().'?course='.$course_code.$extra_params.'">';
4397
                        $html .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4398
                    }
4399
                    $html .= '</a>';
4400
                    $html .= '</td></tr>';
4401
                }
@@ 4729-4732 (lines=4) @@
4726
                    if ($course_code == $courseCodeFromGet && $_GET['session_id'] == $session_id_from_get) {
4727
                        $details = '<a href="#">';
4728
                        $details .=Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4729
                    } else {
4730
                        $details = '<a href="'.api_get_self().'?course='.$course_code.'&session_id='.$session_id_from_get.$extra_params.'">';
4731
                        $details .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4732
                    }
4733
                    $details .= '</a>';
4734
                    $html .= Display::tag('td', $details, array('align'=>'center'));
4735
                    $html .= '</tr>';