Merge pull request #1128 from jloguercio/8183-1.11.x

Fix bug when you set a value in in score field it show the default value if you editing it - Refs #8183
ofaj
José Loguercio 9 years ago
commit 2b1aa5972b
  1. 10
      main/exercice/fill_blanks.class.php

@ -149,15 +149,11 @@ class FillBlanks extends Question
if (isset($listAnswersInfo) && count($listAnswersInfo["tabweighting"]) > 0) {
foreach ($listAnswersInfo["tabweighting"] as $i => $weighting) {
if (!empty($i)) {
echo 'document.getElementById("weighting['.$i.']").value = "'.$weighting.'";';
}
echo 'document.getElementById("weighting['.$i.']").value = "'.$weighting.'";';
}
foreach ($listAnswersInfo["tabinputsize"] as $i => $sizeOfInput) {
if (!empty($i)) {
echo 'document.getElementById("sizeofinput['.$i.']").value = "'.$sizeOfInput.'";';
echo '$("#samplesize\\\['.$i.'\\\]").width('.$sizeOfInput.');';
}
echo 'document.getElementById("sizeofinput['.$i.']").value = "'.$sizeOfInput.'";';
echo '$("#samplesize\\\['.$i.'\\\]").width('.$sizeOfInput.');';
}
}

Loading…
Cancel
Save