This bug has been fixed (but I had forgotten to update my own moodle test site!). Done now. See this discussion.
Joseph
This bug has been fixed (but I had forgotten to update my own moodle test site!). Done now. See this discussion.
Joseph
Hi Pierre and Tim,
I was not aware of MDL-3274 which is an old bug recently revived. Further to this discussion (which did not spark a lot of reactions at the time) I have added the following to my local version of multianswer/questiontype.php and am quite happy with it. I see no reason to add a random length element as suggested by Pierre in the bug tracker discussion. We must not be paranoid
about the provided input length "giving away" the answer to the student, just practical that input length should be reasonably long enough to accomodate the longest correct answer (if there are more than one).
case 'shortanswer': case 'numerical': // set length of answer input field to length of longest expected answer $snmaxlen= 0; foreach ($answers as $snanswer) { if (strlen($snanswer->answer) > $snmaxlen){ $snmaxlen = strlen($snanswer->answer); } } if ($snmaxlen<6){ $snmaxlen= 6; }
Joseph