Code Duplication    Length = 9-13 lines in 2 locations

main/exercise/exercise.class.php 1 location

@@ 7886-7894 (lines=9) @@
7883
            $show_only_score = true;
7884
        }
7885
7886
        if ($show_results || $show_only_score) {
7887
            $user_info = api_get_user_info($exercise_stat_info['exe_user_id']);
7888
            // Shows exercise header.
7889
            echo $this->show_exercise_result_header(
7890
                $user_info['complete_name'],
7891
                api_convert_and_format_date($exercise_stat_info['start_date'], DATE_TIME_FORMAT_LONG),
7892
                $exercise_stat_info['duration']
7893
            );
7894
        }
7895
7896
        // Display text when test is finished #4074 and for LP #4227
7897
        $end_of_message = $this->selectTextWhenFinished();

main/inc/lib/exercise.lib.php 1 location

@@ 3553-3565 (lines=13) @@
3550
            }
3551
        }
3552
3553
        if ($show_results || $show_only_score) {
3554
            $user_info = api_get_user_info($exercise_stat_info['exe_user_id']);
3555
            //Shows exercise header
3556
            echo $objExercise->show_exercise_result_header(
3557
                $user_info,
3558
                api_convert_and_format_date(
3559
                    $exercise_stat_info['start_date'],
3560
                    DATE_TIME_FORMAT_LONG
3561
                ),
3562
                $exercise_stat_info['duration'],
3563
                $exercise_stat_info['user_ip']
3564
            );
3565
        }
3566
3567
        // Display text when test is finished #4074 and for LP #4227
3568
        $end_of_message = $objExercise->selectTextWhenFinished();