Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 513-521 (lines=9) @@
510
                                    learnpathItem::humanize_status($lesson_status, false, $type)
511
                                );
512
513
                                if ($row['item_type'] == 'quiz') {
514
                                    if (!$is_allowed_to_edit && $result_disabled_ext_all) {
515
                                        $temp[] = '/';
516
                                    } else {
517
                                        $temp[] = ($score == 0 ? '0/'.$maxscore : ($maxscore == 0 ? $score : $score.'/'.float_format($maxscore, 1)));
518
                                    }
519
                                } else {
520
                                    $temp[] = ($score == 0 ? '/' : ($maxscore == 0 ? $score : $score.'/'.float_format($maxscore, 1)));
521
                                }
522
523
                                if ($hideTime === false) {
524
                                    $temp[] = $time;
@@ 888-896 (lines=9) @@
885
                            $temp[] = api_html_entity_decode($title, ENT_QUOTES);
886
                            $temp[] = api_html_entity_decode($lesson_status, ENT_QUOTES);
887
888
                            if ($row['item_type'] == 'quiz') {
889
                                if (!$is_allowed_to_edit && $result_disabled_ext_all) {
890
                                    $temp[] = '/';
891
                                } else {
892
                                    $temp[] = ($score == 0 ? '0/'.$maxscore : ($maxscore == 0 ? $score : $score.'/'.float_format($maxscore, 1)));
893
                                }
894
                            } else {
895
                                $temp[] = ($score == 0 ? '/' : ($maxscore == 0 ? $score : $score.'/'.float_format($maxscore, 1)));
896
                            }
897
898
                            if ($hideTime === false) {
899
                                $temp[] = $time;