MDL 2.2.5 Gradebook hanging when saving changes

MDL 2.2.5 Gradebook hanging when saving changes

by George Fox Moodle Admins -
Number of replies: 2
We are using Moodle 2.2.5. The gradebook is hanging when we click "Save changes" after an extra credit grade item is added with the Extra credit box checked. With 30 or more students, it doesn't seem to matter how many grade columns are being processed in that transaction. Afterward, the course site hangs when you click Grades and we are never able to access the gradebook after that. Our only workaround has been to backup the course and then restore it to a new course site. Here are some of our settings: * Our php configuration has the setting max_input_vars = 10K. * In 2.2.5, we have set Site Administration > Grades > General settings > Unlimited grades = Y. * In 2.2.5, we have set Site Administration > Grades > General settings > Navigation method = Tabs. * All other gradebook general settings are the default. We used these same settings successfully with extra credit in 1.9.x.
In reply to George Fox Moodle Admins

Re: MDL 2.2.5 Gradebook hanging when saving changes

by Wendell Jones -

If you also have some number of low grades to be dropped, this is the same issue that I have just tracked down (which is fixed in the new 2.3.3 version).  The combination of an extra credit item and droplow greater than zero hits the bug which causes an infinite loop.  If you want to patch it yourself, here is the change needed:

In lib/grade/grade_category.php, move the line containing only:

$i++;

which occurs at line number 932 in version 2.3.2+

up to line 915 right after the line:

$possibleitemid = $grade_keys[$originalindex+$i];

 

This keeps it from going into an infinite loop if the extra credit if statement is true.


I hope this helps.

Wendell

P.S. I didn't make the fix in 2.3.3, I just saw that it was in there after I tracked it down on my system.

In reply to Wendell Jones

Re: MDL 2.2.5 Gradebook hanging when saving changes

by George Fox Moodle Admins -

Thanks so much!  We did have one instance where the professor was using extra credit and drop the lowest with weighted categories.  We also had an instance with extra credit but drop the lowest = zero in all weighted categories.