Code Duplication    Length = 4-6 lines in 3 locations

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

@@ 761-766 (lines=6) @@
758
                                        Display::return_icon('view_less_stats.gif', get_lang('HideAllAttempts')),
759
                                        api_get_self() . '?action=stats' . $my_url_suffix . '&session_id=' . $session_id . '&lp_item_id=' . $my_id
760
                                    );
761
                                } else {
762
                                    $correct_test_link = Display::url(
763
                                        Display::return_icon('view_more_stats.gif', get_lang('ShowAllAttemptsByExercise')),
764
                                        api_get_self() . '?action=stats&extend_attempt=1' . $my_url_suffix . '&session_id=' . $session_id . '&lp_item_id=' . $my_id
765
                                    );
766
                                }
767
                            }
768
                        }
769
@@ 4405-4408 (lines=4) @@
4402
                    ) {
4403
                        $html .= '<a href="#">';
4404
                        $html .= Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4405
                    } else {
4406
                        $html .= '<a href="'.api_get_self().'?course='.$course_code.$extra_params.'">';
4407
                        $html .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4408
                    }
4409
                    $html .= '</a>';
4410
                    $html .= '</td></tr>';
4411
                }
@@ 4739-4742 (lines=4) @@
4736
                    if ($course_code == $courseCodeFromGet && $_GET['session_id'] == $session_id_from_get) {
4737
                        $details = '<a href="#">';
4738
                        $details .=Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4739
                    } else {
4740
                        $details = '<a href="'.api_get_self().'?course='.$course_code.'&session_id='.$session_id_from_get.$extra_params.'">';
4741
                        $details .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4742
                    }
4743
                    $details .= '</a>';
4744
                    $html .= Display::tag('td', $details, array('align'=>'center'));
4745
                    $html .= '</tr>';