|
|
|
@ -267,6 +267,7 @@ class MoodleImport |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
removeDir($destinationDir); |
|
|
|
removeDir($destinationDir); |
|
|
|
|
|
|
|
|
|
|
|
return $packageContent[$mainFileKey]; |
|
|
|
return $packageContent[$mainFileKey]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -625,9 +626,7 @@ class MoodleImport |
|
|
|
|
|
|
|
|
|
|
|
$answerOptionsWeight = substr($answerOptionsWeight, 0, -1); |
|
|
|
$answerOptionsWeight = substr($answerOptionsWeight, 0, -1); |
|
|
|
$answerOptionsSize = substr($answerOptionsSize, 0, -1); |
|
|
|
$answerOptionsSize = substr($answerOptionsSize, 0, -1); |
|
|
|
|
|
|
|
|
|
|
|
$answerOptions = $answerOptionsWeight.':'.$answerOptionsSize.':0@'; |
|
|
|
$answerOptions = $answerOptionsWeight.':'.$answerOptionsSize.':0@'; |
|
|
|
|
|
|
|
|
|
|
|
$placeholder = $placeholder.PHP_EOL.$answerOptions; |
|
|
|
$placeholder = $placeholder.PHP_EOL.$answerOptions; |
|
|
|
|
|
|
|
|
|
|
|
// This is a minor trick to clean the question description that in a multianswer is the main placeholder |
|
|
|
// This is a minor trick to clean the question description that in a multianswer is the main placeholder |
|
|
|
@ -657,9 +656,7 @@ class MoodleImport |
|
|
|
|
|
|
|
|
|
|
|
$answerOptionsWeight = substr($answerOptionsWeight, 0, -1); |
|
|
|
$answerOptionsWeight = substr($answerOptionsWeight, 0, -1); |
|
|
|
$answerOptionsSize = substr($answerOptionsSize, 0, -1); |
|
|
|
$answerOptionsSize = substr($answerOptionsSize, 0, -1); |
|
|
|
|
|
|
|
|
|
|
|
$answerOptions = $answerOptionsWeight.':'.$answerOptionsSize.':0@'; |
|
|
|
$answerOptions = $answerOptionsWeight.':'.$answerOptionsSize.':0@'; |
|
|
|
|
|
|
|
|
|
|
|
$placeholder = $placeholder.PHP_EOL.$answerOptions; |
|
|
|
$placeholder = $placeholder.PHP_EOL.$answerOptions; |
|
|
|
|
|
|
|
|
|
|
|
// sets the total weighting of the question |
|
|
|
// sets the total weighting of the question |
|
|
|
@ -884,7 +881,6 @@ class MoodleImport |
|
|
|
foreach ($activities as $activity) { |
|
|
|
foreach ($activities as $activity) { |
|
|
|
|
|
|
|
|
|
|
|
$currentItem = []; |
|
|
|
$currentItem = []; |
|
|
|
|
|
|
|
|
|
|
|
$thisIsAnInvalidItem = false; |
|
|
|
$thisIsAnInvalidItem = false; |
|
|
|
|
|
|
|
|
|
|
|
if ($activity->childNodes->length) { |
|
|
|
if ($activity->childNodes->length) { |