|
|
|
@ -35,7 +35,7 @@ class MatchingDraggable extends Question |
|
|
|
$answer = new Answer($this->id); |
|
|
|
$answer = new Answer($this->id); |
|
|
|
$answer->read(); |
|
|
|
$answer->read(); |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($answer->nbrAnswers) && count($answer->nbrAnswers) > 0) { |
|
|
|
if ($answer->nbrAnswers > 0) { |
|
|
|
for ($i = 1; $i <= $answer->nbrAnswers; $i++) { |
|
|
|
for ($i = 1; $i <= $answer->nbrAnswers; $i++) { |
|
|
|
$correct = $answer->isCorrect($i); |
|
|
|
$correct = $answer->isCorrect($i); |
|
|
|
if (empty($correct)) { |
|
|
|
if (empty($correct)) { |
|
|
|
@ -58,7 +58,7 @@ class MatchingDraggable extends Question |
|
|
|
$nb_options++; |
|
|
|
$nb_options++; |
|
|
|
} |
|
|
|
} |
|
|
|
} elseif (!empty($this->id)) { |
|
|
|
} elseif (!empty($this->id)) { |
|
|
|
if (count($answer->nbrAnswers) > 0) { |
|
|
|
if ($answer->nbrAnswers > 0) { |
|
|
|
$nb_matches = $nb_options = 0; |
|
|
|
$nb_matches = $nb_options = 0; |
|
|
|
for ($i = 1; $i <= $answer->nbrAnswers; $i++) { |
|
|
|
for ($i = 1; $i <= $answer->nbrAnswers; $i++) { |
|
|
|
if ($answer->isCorrect($i)) { |
|
|
|
if ($answer->isCorrect($i)) { |
|
|
|
|