|
|
|
@ -133,17 +133,17 @@ class UniqueAnswer extends Question |
|
|
|
|
for ($i = 1; $i <= $nb_answers; ++$i) { |
|
|
|
|
$form->addHtml('<tr>'); |
|
|
|
|
if (isset($answer) && is_object($answer)) { |
|
|
|
|
if ($answer->correct[$i]) { |
|
|
|
|
if (isset($answer->correct[$i]) && $answer->correct[$i]) { |
|
|
|
|
$correct = $i; |
|
|
|
|
} |
|
|
|
|
$defaults['answer['.$i.']'] = $answer->answer[$i]; |
|
|
|
|
$defaults['comment['.$i.']'] = $answer->comment[$i]; |
|
|
|
|
$defaults['weighting['.$i.']'] = float_format( |
|
|
|
|
$answer->weighting[$i], |
|
|
|
|
1 |
|
|
|
|
); |
|
|
|
|
$defaults['answer['.$i.']'] = isset($answer->answer[$i]) ? $answer->answer[$i] : ''; |
|
|
|
|
$defaults['comment['.$i.']'] = isset($answer->comment[$i]) ? $answer->comment[$i] : ''; |
|
|
|
|
$defaults['weighting['.$i.']'] = isset($answer->weighting[$i]) ? float_format($answer->weighting[$i], 1) : 0; |
|
|
|
|
$item_list = []; |
|
|
|
|
if (isset($answer->destination[$i])) { |
|
|
|
|
$item_list = explode('@@', $answer->destination[$i]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$item_list = explode('@@', $answer->destination[$i]); |
|
|
|
|
|
|
|
|
|
$try = isset($item_list[0]) ? $item_list[0] : ''; |
|
|
|
|
$lp = isset($item_list[1]) ? $item_list[1] : ''; |
|
|
|
|