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
@@ 4363-4366 (lines=4) @@
4360
                    ) {
4361
                        $html .= '<a href="#">';
4362
                        $html .= Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4363
                    } else {
4364
                        $html .= '<a href="'.api_get_self().'?course='.$course_code.$extra_params.'">';
4365
                        $html .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4366
                    }
4367
                    $html .= '</a>';
4368
                    $html .= '</td></tr>';
4369
                }
@@ 4697-4700 (lines=4) @@
4694
                    if ($course_code == $courseCodeFromGet && $_GET['session_id'] == $session_id_from_get) {
4695
                        $details = '<a href="#">';
4696
                        $details .=Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4697
                    } else {
4698
                        $details = '<a href="'.api_get_self().'?course='.$course_code.'&session_id='.$session_id_from_get.$extra_params.'">';
4699
                        $details .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4700
                    }
4701
                    $details .= '</a>';
4702
                    $html .= Display::tag('td', $details, array('align'=>'center'));
4703
                    $html .= '</tr>';