main/exercise/answer.class.php 1 location
|
@@ 870-880 (lines=11) @@
|
| 867 |
|
|
| 868 |
|
$answerId = $quizAnswer->getIid(); |
| 869 |
|
|
| 870 |
|
if ($answerId) { |
| 871 |
|
$quizAnswer |
| 872 |
|
->setId($answerId) |
| 873 |
|
->setIdAuto($answerId); |
| 874 |
|
|
| 875 |
|
$em->merge($quizAnswer); |
| 876 |
|
$em->flush(); |
| 877 |
|
|
| 878 |
|
$correctAnswers[$answerId] = $answer['correct']; |
| 879 |
|
$onlyAnswers[$answerId] = $answer['answer']; |
| 880 |
|
} |
| 881 |
|
} |
| 882 |
|
} else { |
| 883 |
|
for ($i = 1; $i <= $this->nbrAnswers; $i++) { |
src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php 1 location
|
@@ 1938-1948 (lines=11) @@
|
| 1935 |
|
|
| 1936 |
|
$answerId = $quizAnswer->getIid(); |
| 1937 |
|
|
| 1938 |
|
if ($answerId) { |
| 1939 |
|
$quizAnswer |
| 1940 |
|
->setId($answerId) |
| 1941 |
|
->setIdAuto($answerId); |
| 1942 |
|
|
| 1943 |
|
$em->merge($quizAnswer); |
| 1944 |
|
$em->flush(); |
| 1945 |
|
|
| 1946 |
|
$correctAnswers[$answerId] = $answer['correct']; |
| 1947 |
|
$onlyAnswers[$answerId] = $answer['answer']; |
| 1948 |
|
} |
| 1949 |
|
} |
| 1950 |
|
} else { |
| 1951 |
|
foreach ($question->answers as $index => $answer) { |