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
@@ 4322-4325 (lines=4) @@
4319
                    ) {
4320
                        $html .= '<a href="#">';
4321
                        $html .= Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4322
                    } else {
4323
                        $html .= '<a href="'.api_get_self().'?course='.$course_code.$extra_params.'">';
4324
                        $html .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4325
                    }
4326
                    $html .= '</a>';
4327
                    $html .= '</td></tr>';
4328
                }
@@ 4656-4659 (lines=4) @@
4653
                    if ($course_code == $courseCodeFromGet && $_GET['session_id'] == $session_id_from_get) {
4654
                        $details = '<a href="#">';
4655
                        $details .=Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4656
                    } else {
4657
                        $details = '<a href="'.api_get_self().'?course='.$course_code.'&session_id='.$session_id_from_get.$extra_params.'">';
4658
                        $details .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4659
                    }
4660
                    $details .= '</a>';
4661
                    $html .= Display::tag('td', $details, array('align'=>'center'));
4662
                    $html .= '</tr>';