Code Duplication    Length = 5-5 lines in 2 locations

main/exercice/exercise.class.php 2 locations

@@ 5003-5007 (lines=5) @@
5000
                            $questionScore = 0;
5001
                            $answer=0;
5002
                            Event::saveQuestionAttempt($questionScore, $answer, $quesId, $exeId, 0);
5003
                            if (is_array($exerciseResultCoordinates[$quesId])) {
5004
                                foreach($exerciseResultCoordinates[$quesId] as $idx => $val) {
5005
                                    Event::saveExerciseAttemptHotspot($exeId,$quesId,$idx,0,$val);
5006
                                }
5007
                            }
5008
                        } else {
5009
                            Event::saveQuestionAttempt($questionScore, $answer, $quesId, $exeId, 0);
5010
                            if (is_array($exerciseResultCoordinates[$quesId])) {
@@ 5010-5014 (lines=5) @@
5007
                            }
5008
                        } else {
5009
                            Event::saveQuestionAttempt($questionScore, $answer, $quesId, $exeId, 0);
5010
                            if (is_array($exerciseResultCoordinates[$quesId])) {
5011
                                foreach($exerciseResultCoordinates[$quesId] as $idx => $val) {
5012
                                    Event::saveExerciseAttemptHotspot($exeId,$quesId,$idx,$choice[$idx],$val);
5013
                                }
5014
                            }
5015
                        }
5016
                    }
5017
                    $my_exe_id = $exeId;