-
Sub-task
-
Resolution: Fixed
-
Minor
-
None
-
1.8
-
None
-
MOODLE_18_STABLE
On building the edit_calculated_form.php , the default answer[0] fraction is set to 1 which is the correct value
line 75 of edit_calculated_form.php
$mform->addElement('hidden', 'fraction[0]', 1);
however at line 76 there is another line to setConstants
$mform->setConstants(array('fraction[0]'=>PARAM_INT));
written this way the final result on the input form is
<input name="fraction[0]" type="hidden" value="2" />
if we comment line 76
// $mform->setConstants(array('fraction[0]'=>PARAM_INT));
the result is the one expected
<input name="fraction[0]" type="hidden" value="1" />
And the value stored in question_answers table is the right one, the preview.php is working correctly etc.