Code Duplication    Length = 5-5 lines in 2 locations

main/inc/lib/MoodleImport.class.php 2 locations

@@ 620-624 (lines=5) @@
617
                $answerOptionsWeight = '::';
618
                $answerOptionsSize = '';
619
                $questionWeighting = 0;
620
                foreach ($optionsValues as $index => $value) {
621
                    $questionWeighting += $value['weight'];
622
                    $answerOptionsWeight .= $value['weight'].',';
623
                    $answerOptionsSize .= $value['size'].',';
624
                }
625
626
                $answerOptionsWeight = substr($answerOptionsWeight, 0, -1);
627
                $answerOptionsSize = substr($answerOptionsSize, 0, -1);
@@ 652-656 (lines=5) @@
649
                $answerOptionsWeight = '::';
650
                $answerOptionsSize = '';
651
                $questionWeighting = 0;
652
                foreach ($optionsValues as $index => $value) {
653
                    $questionWeighting += $value['weight'];
654
                    $answerOptionsWeight .= $value['weight'].',';
655
                    $answerOptionsSize .= $value['size'].',';
656
                }
657
658
                $answerOptionsWeight = substr($answerOptionsWeight, 0, -1);
659
                $answerOptionsSize = substr($answerOptionsSize, 0, -1);