Best practice forum (Archived)

Quiz Questions Losing Correct Value on Edit

 
? ?
Quiz Questions Losing Correct Value on Edit
de ? ? - Thursday, 14 de March de 2013, 07:18
 

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

Simon Coggins
Re: Quiz Questions Losing Correct Value on Edit
de Simon Coggins - Thursday, 14 de March de 2013, 15:06
Grupo 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.

Simon Coggins
Re: Quiz Questions Losing Correct Value on Edit
de Simon Coggins - Thursday, 14 de March de 2013, 15:17
Grupo 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