Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 577-581 (lines=5) @@
574
                $answerOptionsWeight = '::';
575
                $answerOptionsSize = '';
576
                $questionWeighting = 0;
577
                foreach ($optionsValues as $index => $value) {
578
                    $questionWeighting += $value['weight'];
579
                    $answerOptionsWeight .= $value['weight'].',';
580
                    $answerOptionsSize .= $value['size'].',';
581
                }
582
583
                $answerOptionsWeight = substr($answerOptionsWeight, 0, -1);
584
                $answerOptionsSize = substr($answerOptionsSize, 0, -1);
@@ 609-613 (lines=5) @@
606
                $answerOptionsWeight = '::';
607
                $answerOptionsSize = '';
608
                $questionWeighting = 0;
609
                foreach ($optionsValues as $index => $value) {
610
                    $questionWeighting += $value['weight'];
611
                    $answerOptionsWeight .= $value['weight'].',';
612
                    $answerOptionsSize .= $value['size'].',';
613
                }
614
615
                $answerOptionsWeight = substr($answerOptionsWeight, 0, -1);
616
                $answerOptionsSize = substr($answerOptionsSize, 0, -1);