Code Duplication    Length = 9-13 lines in 2 locations

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

@@ 3499-3511 (lines=13) @@
3496
            $show_only_score = false;
3497
        }
3498
3499
        if ($show_results || $show_only_score) {
3500
            $user_info = api_get_user_info($exercise_stat_info['exe_user_id']);
3501
            //Shows exercise header
3502
            echo $objExercise->show_exercise_result_header(
3503
                $user_info,
3504
                api_convert_and_format_date(
3505
                    $exercise_stat_info['start_date'],
3506
                    DATE_TIME_FORMAT_LONG
3507
                ),
3508
                $exercise_stat_info['duration'],
3509
                $exercise_stat_info['user_ip']
3510
            );
3511
        }
3512
3513
        // Display text when test is finished #4074 and for LP #4227
3514
        $end_of_message = $objExercise->selectTextWhenFinished();

main/exercice/exercise.class.php 1 location

@@ 7723-7731 (lines=9) @@
7720
            $show_only_score = true;
7721
        }
7722
7723
        if ($show_results || $show_only_score) {
7724
            $user_info = api_get_user_info($exercise_stat_info['exe_user_id']);
7725
            // Shows exercise header.
7726
            echo $this->show_exercise_result_header(
7727
                $user_info['complete_name'],
7728
                api_convert_and_format_date($exercise_stat_info['start_date'], DATE_TIME_FORMAT_LONG),
7729
                $exercise_stat_info['duration']
7730
            );
7731
        }
7732
7733
        // Display text when test is finished #4074 and for LP #4227
7734
        $end_of_message = $this->selectTextWhenFinished();