Code Duplication    Length = 8-11 lines in 2 locations

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

@@ 3935-3945 (lines=11) @@
3932
            $total_score_text .= '</div>';
3933
        }
3934
3935
        if (!empty($category_list) && ($show_results || $show_only_score)) {
3936
            // Adding total
3937
            $category_list['total'] = array(
3938
                'score' => $total_score,
3939
                'total' => $total_weight
3940
            );
3941
            echo TestCategory::get_stats_table_by_attempt(
3942
                $objExercise->id,
3943
                $category_list
3944
            );
3945
        }
3946
3947
        if ($show_all_but_expected_answer) {
3948
            $exercise_content .= "<div class='normal-message'>".get_lang(

main/exercise/exercise_show.php 1 location

@@ 925-932 (lines=8) @@
922
    }
923
}
924
925
if (!empty($category_list) && ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt)) {
926
    // Adding total
927
    $category_list['total'] = array(
928
        'score' => $my_total_score_temp,
929
        'total' => $totalWeighting
930
    );
931
    echo TestCategory::get_stats_table_by_attempt($objExercise->id, $category_list);
932
}
933
934
echo $total_score_text;
935
echo $exercise_content;