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