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
@@ 4273-4276 (lines=4) @@
4270
                    ) {
4271
                        $html .= '<a href="#">';
4272
                        $html .= Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4273
                    } else {
4274
                        $html .= '<a href="'.api_get_self().'?course='.$course_code.$extra_params.'">';
4275
                        $html .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4276
                    }
4277
                    $html .= '</a>';
4278
                    $html .= '</td></tr>';
4279
                }
@@ 4607-4610 (lines=4) @@
4604
                    if ($course_code == $courseCodeFromGet && $_GET['session_id'] == $session_id_from_get) {
4605
                        $details = '<a href="#">';
4606
                        $details .=Display::return_icon('2rightarrow_na.png', get_lang('Details'));
4607
                    } else {
4608
                        $details = '<a href="'.api_get_self().'?course='.$course_code.'&session_id='.$session_id_from_get.$extra_params.'">';
4609
                        $details .= Display::return_icon('2rightarrow.png', get_lang('Details'));
4610
                    }
4611
                    $details .= '</a>';
4612
                    $html .= Display::tag('td', $details, array('align'=>'center'));
4613
                    $html .= '</tr>';