Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 3832-3838 (lines=7) @@
3829
                    $category_was_added_for_this_test = true;
3830
                }
3831
3832
                if (isset($objQuestionTmp->category_list) && !empty($objQuestionTmp->category_list)) {
3833
                    foreach ($objQuestionTmp->category_list as $category_id) {
3834
                        $category_list[$category_id]['score'] += $my_total_score;
3835
                        $category_list[$category_id]['total'] += $my_total_weight;
3836
                        $category_was_added_for_this_test = true;
3837
                    }
3838
                }
3839
3840
                // No category for this question!
3841
                if ($category_was_added_for_this_test == false) {

main/exercise/exercise_show.php 1 location

@@ 836-842 (lines=7) @@
833
        $category_was_added_for_this_test = true;
834
    }
835
836
    if (isset($objQuestionTmp->category_list) && !empty($objQuestionTmp->category_list)) {
837
        foreach ($objQuestionTmp->category_list as $category_id) {
838
            $category_list[$category_id]['score'] += $my_total_score;
839
            $category_list[$category_id]['total'] += $my_total_weight;
840
            $category_was_added_for_this_test = true;
841
        }
842
    }
843
844
    // No category for this question!
845
    if (!isset($category_list['none']['score'])) {