Code Duplication    Length = 5-11 lines in 3 locations

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

@@ 3892-3902 (lines=11) @@
3889
            $total_score_text .= '</div>';
3890
        }
3891
3892
        if (!empty($category_list) && ($show_results || $show_only_score)) {
3893
            //Adding total
3894
            $category_list['total'] = array(
3895
                'score' => $total_score,
3896
                'total' => $total_weight
3897
            );
3898
            echo TestCategory::get_stats_table_by_attempt(
3899
                $objExercise->id,
3900
                $category_list
3901
            );
3902
        }
3903
3904
        if ($show_all_but_expected_answer) {
3905
            $exercise_content .= "<div class='normal-message'>" . get_lang(

main/exercise/exercise.class.php 1 location

@@ 7250-7254 (lines=5) @@
7247
            }
7248
        }
7249
7250
        if (!empty($category_list) && ($show_results || $show_only_score)) {
7251
            //Adding total
7252
            $category_list['total'] = array('score' => $total_score, 'total' => $total_weight);
7253
            echo TestCategory::get_stats_table_by_attempt($this->id, $category_list, $this->categoryMinusOne);
7254
        }
7255
7256
        echo $total_score_text;
7257
        echo $exercise_content;

main/exercise/exercise_show.php 1 location

@@ 863-870 (lines=8) @@
860
    }
861
}
862
863
if (!empty($category_list) && ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt)) {
864
    // Adding total
865
    $category_list['total'] = array(
866
        'score' => $my_total_score_temp,
867
        'total' => $totalWeighting
868
    );
869
    echo TestCategory::get_stats_table_by_attempt($objExercise->id, $category_list);
870
}
871
872
echo $total_score_text;
873
echo $exercise_content;