@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | $folder = api_get_unique_id(); |
39 | - $destinationDir = api_get_path(SYS_ARCHIVE_PATH) . $folder; |
|
39 | + $destinationDir = api_get_path(SYS_ARCHIVE_PATH).$folder; |
|
40 | 40 | $coursePath = api_get_course_path(); |
41 | 41 | $sessionId = api_get_session_id(); |
42 | 42 | $groupId = api_get_group_id(); |
43 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $coursePath . '/document'; |
|
43 | + $documentPath = api_get_path(SYS_COURSE_PATH).$coursePath.'/document'; |
|
44 | 44 | $courseInfo = api_get_course_info(); |
45 | 45 | |
46 | 46 | mkdir($destinationDir, api_get_permissions_for_new_directories(), true); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $questionInstance->updateTitle($moduleValues['question_instances'][$index]['name']); |
161 | 161 | |
162 | 162 | // Replace the path from @@PLUGINFILE@@ to a correct chamilo path |
163 | - $moduleValues['question_instances'][$index]['questiontext'] = str_replace('@@PLUGINFILE@@', '/courses/' . $coursePath . '/document/moodle', $moduleValues['question_instances'][$index]['questiontext']); |
|
163 | + $moduleValues['question_instances'][$index]['questiontext'] = str_replace('@@PLUGINFILE@@', '/courses/'.$coursePath.'/document/moodle', $moduleValues['question_instances'][$index]['questiontext']); |
|
164 | 164 | $questionInstance->updateDescription($moduleValues['question_instances'][$index]['questiontext']); |
165 | 165 | $questionInstance->updateLevel(1); |
166 | 166 | $questionInstance->updateCategory(0); |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | |
621 | 621 | $coursePath = api_get_course_path(); |
622 | 622 | |
623 | - $placeholder = str_replace('@@PLUGINFILE@@', '/courses/' . $coursePath . '/document/moodle', $currentQuestion['questiontext']); |
|
623 | + $placeholder = str_replace('@@PLUGINFILE@@', '/courses/'.$coursePath.'/document/moodle', $currentQuestion['questiontext']); |
|
624 | 624 | |
625 | 625 | $optionsValues = []; |
626 | 626 | |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | if ($weighting > 0) { |
736 | 736 | $questionWeighting += $weighting; |
737 | 737 | } |
738 | - $goodAnswer = $correct ? true : false; |
|
738 | + $goodAnswer = $correct ? true : false; |
|
739 | 739 | |
740 | 740 | $objAnswer->createAnswer( |
741 | 741 | $answer, |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | if ($weighting > 0) { |
769 | 769 | $questionWeighting += $weighting; |
770 | 770 | } |
771 | - $goodAnswer = $correct ? true : false; |
|
771 | + $goodAnswer = $correct ? true : false; |
|
772 | 772 | |
773 | 773 | $objAnswer->createAnswer( |
774 | 774 | $answer, |
@@ -865,9 +865,9 @@ discard block |
||
865 | 865 | |
866 | 866 | $currentAnswers = $correctAnswer.$othersAnswers; |
867 | 867 | $currentAnswers = '['.substr($currentAnswers, 0, -1).'] '; |
868 | - $answer['questiontext'] = str_replace('@@PLUGINFILE@@', '/courses/' . $coursePath . '/document/moodle', $answer['questiontext']); |
|
868 | + $answer['questiontext'] = str_replace('@@PLUGINFILE@@', '/courses/'.$coursePath.'/document/moodle', $answer['questiontext']); |
|
869 | 869 | |
870 | - $placeholder .= '<p> ' . strip_tags($answer['questiontext']).' '.$currentAnswers . ' </p>'; |
|
870 | + $placeholder .= '<p> '.strip_tags($answer['questiontext']).' '.$currentAnswers.' </p>'; |
|
871 | 871 | } |
872 | 872 | |
873 | 873 | return $optionsValues; |