Code Duplication    Length = 5-5 lines in 2 locations

main/inc/lib/MoodleImport.php 2 locations

@@ 698-702 (lines=5) @@
695
                $answerOptionsWeight = '::';
696
                $answerOptionsSize = '';
697
                $questionWeighting = 0;
698
                foreach ($optionsValues as $index => $value) {
699
                    $questionWeighting += $value['weight'];
700
                    $answerOptionsWeight .= $value['weight'].',';
701
                    $answerOptionsSize .= $value['size'].',';
702
                }
703
704
                $answerOptionsWeight = substr($answerOptionsWeight, 0, -1);
705
                $answerOptionsSize = substr($answerOptionsSize, 0, -1);
@@ 737-741 (lines=5) @@
734
                $answerOptionsWeight = '::';
735
                $answerOptionsSize = '';
736
                $questionWeighting = 0;
737
                foreach ($optionsValues as $index => $value) {
738
                    $questionWeighting += $value['weight'];
739
                    $answerOptionsWeight .= $value['weight'].',';
740
                    $answerOptionsSize .= $value['size'].',';
741
                }
742
743
                $answerOptionsWeight = substr($answerOptionsWeight, 0, -1);
744
                $answerOptionsSize = substr($answerOptionsSize, 0, -1);