Details
Description
I just regraded a quiz, which uses only short answer an multiple choice questions. I had previously altered the overall feedback settings, but nothing else. I got the following error loads of times at the bottom of the screen, after all the regradings had happened. It went OK it seems other than that.
Notice: Undefined offset: -2 in E:\Moodle_webserver\moodle\lib\evalmath\evalmath.class.php on line 425
Notice: Undefined offset: -2 in E:\Moodle_webserver\moodle\lib\evalmath\evalmath.class.php on line 425
Notice: Undefined offset: -2 in E:\Moodle_webserver\moodle\lib\evalmath\evalmath.class.php on line 425
Notice: Undefined offset: -2 in E:\Moodle_webserver\moodle\lib\evalmath\evalmath.class.php on line 425
Notice: Undefined offset: -2 in E:\Moodle_webserver\moodle\lib\evalmath\evalmath.class.php on line 425
Notice: Undefined offset: -2 in E:\Moodle_webserver\moodle\lib\evalmath\evalmath.class.php on line 425
Notice: Undefined offset: -2 in E:\Moodle_webserver\moodle\lib\evalmath\evalmath.class.php on line 425
Notice: Undefined offset: -2 in E:\Moodle_webserver\moodle\lib\evalmath\evalmath.class.php on line 425
We are seeing the same thing here. It appears to be caused by an error in the evalmath class which is used for calculated grades.
To reproduce:
error_reporting(E_ALL);
$silly = new EvalMath();
$silly->nfx('(gi6-20+1)/(2*(gi6-20+0.5))');
The actual results of the function appear to be correct, so this warning does not do any harm, but it is rather disturbing.