Code Duplication    Length = 9-13 lines in 2 locations

main/exercice/exercise.class.php 1 location

@@ 7734-7742 (lines=9) @@
7731
            $show_only_score = true;
7732
        }
7733
7734
        if ($show_results || $show_only_score) {
7735
            $user_info = api_get_user_info($exercise_stat_info['exe_user_id']);
7736
            // Shows exercise header.
7737
            echo $this->show_exercise_result_header(
7738
                $user_info['complete_name'],
7739
                api_convert_and_format_date($exercise_stat_info['start_date'], DATE_TIME_FORMAT_LONG),
7740
                $exercise_stat_info['duration']
7741
            );
7742
        }
7743
7744
        // Display text when test is finished #4074 and for LP #4227
7745
        $end_of_message = $this->selectTextWhenFinished();

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

@@ 3486-3498 (lines=13) @@
3483
            $show_only_score = false;
3484
        }
3485
3486
        if ($show_results || $show_only_score) {
3487
            $user_info = api_get_user_info($exercise_stat_info['exe_user_id']);
3488
            //Shows exercise header
3489
            echo $objExercise->show_exercise_result_header(
3490
                $user_info,
3491
                api_convert_and_format_date(
3492
                    $exercise_stat_info['start_date'],
3493
                    DATE_TIME_FORMAT_LONG
3494
                ),
3495
                $exercise_stat_info['duration'],
3496
                $exercise_stat_info['user_ip']
3497
            );
3498
        }
3499
3500
        // Display text when test is finished #4074 and for LP #4227
3501
        $end_of_message = $objExercise->selectTextWhenFinished();