Best practice forum (Archived)

Quiz Questions Losing Correct Value on Edit

 
TrioMichael
Quiz Questions Losing Correct Value on Edit
TrioMichael 发表于 2013年03月14日 Thursday 07:18
小组 Partners

Something has gone awry with quiz questions somewhere between versions  2.2.5.1 and 2.2.15. (Big range, I know!)  This used to work properly in the older version, but does not now.  Here's what's happening:

1. Create a quiz

2. Go to the question bank and add a question - multiple choice in my testing - with at least one answer worth 100%.

3. Edit the question

Result:  Any answers set to be worth 100% now are worth none.

Expected: 100% values stay 100% when opened.

If it's helpful, my very VERY hacky temporary fix was to modify the onQuickFormEvent function in lib/pear/HTML/QuickForm/select.php and add

if ($value === 1.0) $value='1.0';

before the setValue.

Any thoughts?

Thanks,

Michael

CogginsSimon
Re: Quiz Questions Losing Correct Value on Edit
CogginsSimon 发表于 2013年03月14日 Thursday 15:06
小组 Totara

This bug was caused by the fix to T-10291 added in 2.2.15.

I have a fix in review and we'll include it in the next release once it's been tested.

CogginsSimon
Re: Quiz Questions Losing Correct Value on Edit
CogginsSimon 发表于 2013年03月14日 Thursday 15:17
小组 Totara

Here is a copy of the patch (to be applied against 2.2.15) in case you would like to apply it sooner.

Simon