Code Duplication    Length = 7-8 lines in 3 locations

main/exercise/exercise_show.php 1 location

@@ 694-701 (lines=8) @@
691
            $feedback_form->display();
692
            echo '</div>';
693
694
        } else {
695
            $comnt = Event::get_comments($id, $questionId);
696
            echo '<br />';
697
            if (!empty($comnt)) {
698
                echo '<b>' . get_lang('Feedback') . '</b>';
699
                echo '<div id="question_feedback">' . $comnt . '</div>';
700
            }
701
        }
702
703
        if ($is_allowedToEdit && $isFeedbackAllowed) {
704
            if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION))) {

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

@@ 3654-3660 (lines=7) @@
3651
                }
3652
3653
                $comnt = null;
3654
                if ($show_results) {
3655
                    $comnt = Event::get_comments($exe_id, $questionId);
3656
                    if (!empty($comnt)) {
3657
                        echo '<b>' . get_lang('Feedback') . '</b>';
3658
                        echo '<div id="question_feedback">' . $comnt . '</div>';
3659
                    }
3660
                }
3661
3662
                if ($show_results) {
3663
                    $score = array(

main/exercise/exercise.class.php 1 location

@@ 7984-7990 (lines=7) @@
7981
                }
7982
7983
                $comnt = null;
7984
                if ($show_results) {
7985
                    $comnt = get_comments($exe_id, $questionId);
7986
                    if (!empty($comnt)) {
7987
                        echo '<b>'.get_lang('Feedback').'</b>';
7988
                        echo '<div id="question_feedback">'.$comnt.'</div>';
7989
                    }
7990
                }
7991
7992
                $score = array();
7993
                $score['result'] = get_lang('Score')." : ".ExerciseLib::show_score($my_total_score, $my_total_weight, false, true);