Code Duplication    Length = 7-8 lines in 2 locations

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

@@ 3860-3866 (lines=7) @@
3857
                }
3858
3859
                $comnt = null;
3860
                if ($show_results) {
3861
                    $comnt = Event::get_comments($exe_id, $questionId);
3862
                    if (!empty($comnt)) {
3863
                        echo '<b>'.get_lang('Feedback').'</b>';
3864
                        echo ExerciseLib::getFeedbackText($comnt);
3865
                    }
3866
                }
3867
3868
                if ($show_results) {
3869
                    $score = array(

main/exercise/exercise_show.php 1 location

@@ 738-745 (lines=8) @@
735
            $feedback_form->display();
736
            echo '</div>';
737
738
        } else {
739
            $comnt = Event::get_comments($id, $questionId);
740
            echo '<br />';
741
            if (!empty($comnt)) {
742
                echo '<b>'.get_lang('Feedback').'</b>';
743
                echo ExerciseLib::getFeedbackText($comnt);
744
            }
745
        }
746
747
        if ($is_allowedToEdit && $isFeedbackAllowed) {
748
            if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION, ANNOTATION))) {