Code Duplication    Length = 7-8 lines in 3 locations

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

@@ 3599-3605 (lines=7) @@
3596
                }
3597
3598
                $comnt = null;
3599
                if ($show_results) {
3600
                    $comnt = Event::get_comments($exe_id, $questionId);
3601
                    if (!empty($comnt)) {
3602
                        echo '<b>' . get_lang('Feedback') . '</b>';
3603
                        echo '<div id="question_feedback">' . $comnt . '</div>';
3604
                    }
3605
                }
3606
3607
                if ($show_results) {
3608
                    $score = array(

main/exercice/exercise_show.php 1 location

@@ 722-729 (lines=8) @@
719
			$feedback_form->display();
720
			echo '</div>';
721
722
		} else {
723
			$comnt = Event::get_comments($id, $questionId);
724
			echo '<br />';
725
			if (!empty($comnt)) {
726
				echo '<b>'.get_lang('Feedback').'</b>';
727
				echo '<div id="question_feedback">'.$comnt.'</div>';
728
			}
729
		}
730
731
		if ($is_allowedToEdit && $isFeedbackAllowed) {
732
			if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION))) {

main/exercice/exercise.class.php 1 location

@@ 7838-7844 (lines=7) @@
7835
                }
7836
7837
                $comnt = null;
7838
                if ($show_results) {
7839
                    $comnt = get_comments($exe_id, $questionId);
7840
                    if (!empty($comnt)) {
7841
                        echo '<b>'.get_lang('Feedback').'</b>';
7842
                        echo '<div id="question_feedback">'.$comnt.'</div>';
7843
                    }
7844
                }
7845
7846
                $score = array();
7847
                $score['result'] = get_lang('Score')." : ".ExerciseLib::show_score($my_total_score, $my_total_weight, false, true);