Code Duplication    Length = 5-11 lines in 3 locations

main/exercice/exercise_show.php 1 location

@@ 911-918 (lines=8) @@
908
	}
909
}
910
911
if (!empty($category_list) && ($show_results || $show_only_total_score || $showTotalScoreAndUserChoices)) {
912
    // Adding total
913
    $category_list['total'] = array(
914
        'score' => $my_total_score_temp,
915
        'total' => $totalWeighting
916
    );
917
    echo TestCategory::get_stats_table_by_attempt($objExercise->id, $category_list);
918
}
919
920
echo $total_score_text;
921
echo $exercise_content;

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

@@ 3716-3726 (lines=11) @@
3713
            }
3714
        }
3715
3716
        if (!empty($category_list) && ($show_results || $show_only_score)) {
3717
            //Adding total
3718
            $category_list['total'] = array(
3719
                'score' => $total_score,
3720
                'total' => $total_weight
3721
            );
3722
            echo TestCategory::get_stats_table_by_attempt(
3723
                $objExercise->id,
3724
                $category_list
3725
            );
3726
        }
3727
3728
        if ($show_all_but_expected_answer) {
3729
            $exercise_content .= "<div class='normal-message'>" . get_lang(

main/exercice/exercise.class.php 1 location

@@ 7967-7971 (lines=5) @@
7964
            }
7965
        }
7966
7967
        if (!empty($category_list) && ($show_results || $show_only_score)) {
7968
            //Adding total
7969
            $category_list['total'] = array('score' => $total_score, 'total' => $total_weight);
7970
            echo TestCategory::get_stats_table_by_attempt($this->id, $category_list, $this->categoryMinusOne);
7971
        }
7972
7973
        echo $total_score_text;
7974
        echo $exercise_content;