Code Duplication    Length = 5-5 lines in 2 locations

main/exercice/export/exercise_import.inc.php 2 locations

@@ 578-582 (lines=5) @@
575
        case 'ITEMBODY':
576
            // Replace relative links by links to the documents in the course
577
            // $resourcesLinks is only defined by qtiProcessManifest()
578
            if (isset($resourcesLinks) && isset($resourcesLinks['manifest']) && isset($resourcesLinks['web'])) {
579
                foreach ($resourcesLinks['manifest'] as $key => $value) {
580
                    $data = preg_replace('|' . $value . '|', $resourcesLinks['web'][$key], $data);
581
                }
582
            }
583
            $current_question_item_body .= $data;
584
            break;
585
        case 'INLINECHOICE':
@@ 898-902 (lines=5) @@
895
        case 'MATTEXT':
896
            // Replace relative links by links to the documents in the course
897
            // $resourcesLinks is only defined by qtiProcessManifest()
898
            if (isset($resourcesLinks) && isset($resourcesLinks['manifest']) && isset($resourcesLinks['web'])) {
899
                foreach ($resourcesLinks['manifest'] as $key=>$value) {
900
                    $data = preg_replace('|' . $value . '|', $resourcesLinks['web'][$key], $data);
901
                }
902
            }
903
            if (!empty($current_question_item_body)) {
904
                $current_question_item_body .= $data;
905
            } else {