Completed
Pull Request — 1.11.x (#1352)
by José
38:59
created
main/inc/lib/MoodleImport.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                                         $questionInstance->updateTitle($moduleValues['question_instances'][$index]['name']);
146 146
 
147 147
                                         // Replace the path from @@PLUGINFILE@@ to a correct chamilo path
148
-                                        $moduleValues['question_instances'][$index]['questiontext'] = str_replace('@@PLUGINFILE@@', '/courses/' . $coursePath . '/document', $moduleValues['question_instances'][$index]['questiontext']);
148
+                                        $moduleValues['question_instances'][$index]['questiontext'] = str_replace('@@PLUGINFILE@@', '/courses/'.$coursePath.'/document', $moduleValues['question_instances'][$index]['questiontext']);
149 149
                                         $questionInstance->updateDescription($moduleValues['question_instances'][$index]['questiontext']);
150 150
                                         $questionInstance->updateLevel(1);
151 151
                                         $questionInstance->updateCategory(0);
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 
606 606
                 $coursePath = api_get_course_path();
607 607
 
608
-                $placeholder = str_replace('@@PLUGINFILE@@', '/courses/' . $coursePath . '/document', $currentQuestion['questiontext']);
608
+                $placeholder = str_replace('@@PLUGINFILE@@', '/courses/'.$coursePath.'/document', $currentQuestion['questiontext']);
609 609
 
610 610
                 $optionsValues = [];
611 611
 
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
         if ($weighting > 0) {
725 725
             $questionWeighting += $weighting;
726 726
         }
727
-        $goodAnswer =  $correct ? true : false;
727
+        $goodAnswer = $correct ? true : false;
728 728
 
729 729
         $objAnswer->createAnswer(
730 730
             $answer,
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
         if ($weighting > 0) {
758 758
             $questionWeighting += $weighting;
759 759
         }
760
-        $goodAnswer =  $correct ? true : false;
760
+        $goodAnswer = $correct ? true : false;
761 761
 
762 762
         $objAnswer->createAnswer(
763 763
             $answer,
@@ -854,9 +854,9 @@  discard block
 block discarded – undo
854 854
 
855 855
                     $currentAnswers = $correctAnswer.$othersAnswers;
856 856
                     $currentAnswers = '['.substr($currentAnswers, 0, -1).'] ';
857
-                    $answer['questiontext'] = str_replace('@@PLUGINFILE@@', '/courses/' . $coursePath . '/document', $answer['questiontext']);
857
+                    $answer['questiontext'] = str_replace('@@PLUGINFILE@@', '/courses/'.$coursePath.'/document', $answer['questiontext']);
858 858
 
859
-                    $placeholder .= '<p> ' . strip_tags($answer['questiontext']).' '.$currentAnswers . ' </p>';
859
+                    $placeholder .= '<p> '.strip_tags($answer['questiontext']).' '.$currentAnswers.' </p>';
860 860
                 }
861 861
 
862 862
                 return $optionsValues;
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
                 $thisIsAnInvalidItem = false;
889 889
 
890 890
                 if ($activity->childNodes->length) {
891
-                    foreach ($activity->childNodes as $item ) {
891
+                    foreach ($activity->childNodes as $item) {
892 892
                         if ($item->nodeName == 'component' && $item->nodeValue == 'mod_resource') {
893 893
                             $thisIsAnInvalidItem = true;
894 894
                         }
@@ -937,7 +937,7 @@  discard block
 block discarded – undo
937 937
             if (is_array($value)) {
938 938
                 $this->traverseArray($value, $keys);
939 939
             } else {
940
-                if (in_array($key, $keys)){
940
+                if (in_array($key, $keys)) {
941 941
                     unset($array[$key]);
942 942
                 }
943 943
             }
Please login to merge, or discard this patch.